SQL (0.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (2.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (0.1ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (0.1ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (0.1ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (5.8ms) CREATE TABLE "groups" ("id" serial primary key, "name" text, "created_at" timestamp, "updated_at" timestamp, "slug" character varying(255), "description" text, "responsibilities" text, "ancestry" text, "ancestry_depth" integer DEFAULT 0 NOT NULL, "team_email_address" text)  (1.1ms) CREATE INDEX "index_groups_on_ancestry" ON "groups" USING btree ("ancestry")  (1.1ms) CREATE INDEX "index_groups_on_slug" ON "groups" USING btree ("slug")  (3.5ms) CREATE TABLE "information_requests" ("id" serial primary key, "recipient_id" integer, "sender_email" character varying(255), "message" text, "type" character varying(255))   (1.0ms) CREATE INDEX "index_information_requests_on_sender_email" ON "information_requests" USING btree ("sender_email")  (0.9ms) CREATE INDEX "index_information_requests_on_type" ON "information_requests" USING btree ("type")  (3.3ms) CREATE TABLE "memberships" ("id" serial primary key, "group_id" integer, "person_id" integer, "role" text, "created_at" timestamp, "updated_at" timestamp, "leader" boolean DEFAULT 'f')  (1.0ms) CREATE INDEX "index_memberships_on_group_id" ON "memberships" USING btree ("group_id")  (0.9ms) CREATE INDEX "index_memberships_on_person_id" ON "memberships" USING btree ("person_id")  (4.0ms) CREATE TABLE "people" ("id" serial primary key, "given_name" text, "surname" text, "email" text, "primary_phone_number" text, "secondary_phone_number" text, "location" text, "description" text, "created_at" timestamp, "updated_at" timestamp, "works_monday" boolean DEFAULT 't', "works_tuesday" boolean DEFAULT 't', "works_wednesday" boolean DEFAULT 't', "works_thursday" boolean DEFAULT 't', "works_friday" boolean DEFAULT 't', "image" character varying(255), "slug" character varying(255), "works_saturday" boolean DEFAULT 'f', "works_sunday" boolean DEFAULT 'f', "no_phone" boolean DEFAULT 'f')   (1.0ms) CREATE UNIQUE INDEX "index_people_on_slug" ON "people" USING btree ("slug")  (3.1ms) CREATE TABLE "reported_profiles" ("id" serial primary key, "notifier_id" integer, "subject_id" integer, "recipient_email" character varying(255), "reason_for_reporting" text, "additional_details" text)   (3.3ms) CREATE TABLE "tokens" ("id" serial primary key, "value" text, "user_email" text, "created_at" timestamp, "updated_at" timestamp)  (3.1ms) CREATE TABLE "versions" ("id" serial primary key, "item_type" text NOT NULL, "item_id" integer NOT NULL, "event" text NOT NULL, "whodunnit" text, "object" text, "created_at" timestamp, "object_changes" text)   (1.1ms) CREATE INDEX "index_versions_on_item_type_and_item_id" ON "versions" USING btree ("item_type", "item_id")  (0.8ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.3ms) SELECT version FROM "schema_migrations"  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141010090624')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141010090623') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (1.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:42.304489"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 09:31:42.304489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.9ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.5ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:42.319217"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:42.319217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:42.335967"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:31:42.335967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:42.339490"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:31:42.339490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:42.354712"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:31:42.354712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:42.358082"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:31:42.358082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:42.371401"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:42.371401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:42.376602"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:42.376602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:42.380617"], ["updated_at", "2014-10-13 09:31:42.380617"], ["user_email", "example.user.4@digital.justice.gov.uk"], ["value", "af088f89-88e1-4e4a-be63-484f4823e4c2"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/af088f89-88e1-4e4a-be63-484f4823e4c2" for 127.0.0.1 at 2014-10-13 10:31:42 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"af088f89-88e1-4e4a-be63-484f4823e4c2"} Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'af088f89-88e1-4e4a-be63-484f4823e4c2' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.4@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-4' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:42.398545"], ["email", "example.user.4@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-4"], ["surname", "user"], ["updated_at", "2014-10-13 09:31:42.398545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 6]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 6]] Redirected to http://www.example.com/people/example-user-4/edit?prompt=profile Completed 302 Found in 35ms (ActiveRecord: 3.1ms) Started GET "/people/example-user-4/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-4"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 6]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-4' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (6) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (69.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (272.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.0ms) Completed 200 OK in 3276ms (Views: 3254.1ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.727851"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.727851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 4]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 4]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 4]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "4"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:45.732724"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.732724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.781845"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.781845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 6]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 6]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 6]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "6"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:45.786212"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.786212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.788735"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 09:31:45.788735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:45.792790"], ["updated_at", "2014-10-13 09:31:45.792790"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d494df33-7b43-4081-ad95-6e1d1b2b708a"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 7]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 17.9ms Sent mail to test.user@digital.justice.gov.uk (9.8ms) Date: Mon, 13 Oct 2014 10:31:45 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9c01c5e93_e6593fc288c65be47232e@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d494df33-7b43-4081-ad95-6e1d1b2b708a?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/d494df33-7b43-4081-ad95-6e1d1b2b708a?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"d494df33-7b43-4081-ad95-6e1d1b2b708a"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'd494df33-7b43-4081-ad95-6e1d1b2b708a' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 7]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (7) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 27.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.866869"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.866869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 8]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 8]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 8]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "8"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:45.871575"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.871575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:45.887253"], ["updated_at", "2014-10-13 09:31:45.887253"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "54149f63-3da6-4424-ae82-ff94443394e3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 9.1ms Sent mail to james.darling@digital.justice.gov.uk (5.8ms) Date: Mon, 13 Oct 2014 10:31:45 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543b9c01dc0eb_e6593fc288c65be4724e7@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/54149f63-3da6-4424-ae82-ff94443394e3 If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 5.0ms | ActiveRecord: 0.5ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.921548"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.921548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 10]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 10]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 10]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "10"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:45.926258"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.926258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.928819"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:31:45.928819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:45.932086"], ["updated_at", "2014-10-13 09:31:45.932086"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "b9befbdf-31cb-432d-8d89-2165ee84b4e5"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/b9befbdf-31cb-432d-8d89-2165ee84b4e5" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"b9befbdf-31cb-432d-8d89-2165ee84b4e5"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'b9befbdf-31cb-432d-8d89-2165ee84b4e5' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 8]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 8]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 5ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 8]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (8) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:45.984405"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.984405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 12]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 12]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 12]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "12"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:45.988765"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:45.988765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:31:45 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.018093"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.018093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 14]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 14]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 14]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "14"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.120283"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.120283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.124107"], ["updated_at", "2014-10-13 09:31:46.124107"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "7c6dc011-fc84-49bf-9ca6-0bf99b60916f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/7c6dc011-fc84-49bf-9ca6-0bf99b60916f" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"7c6dc011-fc84-49bf-9ca6-0bf99b60916f"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '7c6dc011-fc84-49bf-9ca6-0bf99b60916f' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:46.130956"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 09:31:46.130956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 9]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 9]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 9]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (9) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.1ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:31:46 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.189441"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 09:31:46.189441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.191827"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 09:31:46.191827"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.199215"], ["event", "create"], ["item_id", 11], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0004\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 10]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 1]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 11]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 11]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 11]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:46.217913"], ["event", "destroy"], ["item_id", 11], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 11\ngiven_name: \nsurname: Surname-0004\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:31:46.191827000 Z\nupdated_at: 2014-10-13 09:31:46.191827000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0003"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 11], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 18ms (ActiveRecord: 1.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 11]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.226453"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 09:31:46.226453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.228827"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:31:46.228827"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.230398"], ["event", "create"], ["item_id", 13], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 13]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 13]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.234519"], ["event", "destroy"], ["item_id", 13], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 13\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 09:31:46.228827000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 13], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"4"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 12]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 4]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 13]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 13) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.228827"], ["id", 13], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:31:46.242256"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:46.243894"], ["event", "create"], ["item_id", 13], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.249515"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 09:31:46.249515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.252237"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 09:31:46.252237"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.253779"], ["event", "create"], ["item_id", 15], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0007\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.260401"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.260401"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.262805"], ["event", "create"], ["item_id", 16], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.18@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 16]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 16]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 16]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "16"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.267889"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.267889"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.270152"], ["event", "create"], ["item_id", 17], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0008\nteam_email_address:\n- \n- example.user.17@digital.justice.gov.uk\nancestry:\n- \n- '16'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.271616"], ["group_id", 17], ["person_id", 15], ["updated_at", "2014-10-13 09:31:46.271616"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.275481"], ["event", "create"], ["item_id", 1], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 15\ngroup_id:\n- \n- 17\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.276374' WHERE "people"."id" = 15 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.277195' WHERE "groups"."id" = 17  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"9"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 14]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 9]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 1]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.285277"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 09:31:46.285277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.287746"], ["slug", "surname-0009"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 09:31:46.287746"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.289353"], ["event", "create"], ["item_id", 17], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0009\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.295275"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.295275"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.296797"], ["event", "create"], ["item_id", 18], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.20@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 18]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 18]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 18]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "18"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.301137"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.301137"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.302705"], ["event", "create"], ["item_id", 19], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0009\nteam_email_address:\n- \n- example.user.19@digital.justice.gov.uk\nancestry:\n- \n- '18'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.303906"], ["group_id", 19], ["person_id", 17], ["updated_at", "2014-10-13 09:31:46.303906"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.305281"], ["event", "create"], ["item_id", 2], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 17\ngroup_id:\n- \n- 19\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.305994' WHERE "people"."id" = 17 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.306659' WHERE "groups"."id" = 19  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 2]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.308746"], ["event", "destroy"], ["item_id", 2], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 2\ngroup_id: 19\nperson_id: 17\nrole: \ncreated_at: &1 2014-10-13 09:31:46.303906000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2], ["item_type", "Peoplefinder::Membership"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.310193' WHERE "people"."id" = 17 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.310749' WHERE "groups"."id" = 19  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"14"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 16]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 14]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 2]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.323499"], ["slug", "surname-0010"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 09:31:46.323499"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.329736"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.329736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "20"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.334033"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.334033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 20) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 20 [["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.336723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 20]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "20"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.342150"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.342150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.344129"], ["group_id", 22], ["person_id", 18], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:31:46.344129"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 18]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.345644' WHERE "people"."id" = 18 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.346273' WHERE "groups"."id" = 22  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.347458"], ["group_id", 21], ["person_id", 18], ["role", "Designer"], ["updated_at", "2014-10-13 09:31:46.347458"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 18]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.348709' WHERE "people"."id" = 18 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.349277' WHERE "groups"."id" = 21  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 18]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.357953"], ["slug", "surname-0013"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 09:31:46.357953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0014' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.361345"], ["slug", "surname-0014"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 09:31:46.361345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.383126"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.383126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 23) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 23 [["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.387224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.398100"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.398100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 24) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 24 [["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.401064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 24) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 24 [["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.403895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 24) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 24 [["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.406455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.415764"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.415764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 25) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 25 [["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.418806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 25) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 25 [["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.422036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 25) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 25 [["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.424785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.434015"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.434015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 26) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 26 [["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.436797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 26) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 26 [["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.439485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 26) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 26 [["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.442049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 26) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 26 [["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.446707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.450120"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 09:31:46.450120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 21]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.453746"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:31:46.453746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 22]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0016' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.457431"], ["slug", "surname-0016"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 09:31:46.457431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.465569"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.465569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 27]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 27]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 27]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "27"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.471564"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 09:31:46.471564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.473797"], ["group_id", 28], ["person_id", 23], ["updated_at", "2014-10-13 09:31:46.473797"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 23]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.475222' WHERE "people"."id" = 23 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.475931' WHERE "groups"."id" = 28  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 23]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0017' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.480352"], ["slug", "surname-0017"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 09:31:46.480352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 24]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.485156"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 09:31:46.485156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.487421"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 09:31:46.487421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"26"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 25]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '26' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 26]] Completed 200 OK in 8ms (Views: 3.6ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.502462"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 09:31:46.502462"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.505259"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 09:31:46.505259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"28"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 27]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '28' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 28]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.512598"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 09:31:46.512598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.515137"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 09:31:46.515137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"30"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 29]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '30' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 30]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.522437"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 09:31:46.522437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.524653"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 09:31:46.524653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.530926"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.530926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 29]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 29]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 29]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "29"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.535228"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.535228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.537035"], ["group_id", 30], ["person_id", 32], ["updated_at", "2014-10-13 09:31:46.537035"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 32]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.538368' WHERE "people"."id" = 32 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.539025' WHERE "groups"."id" = 30  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"32"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 31]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '32' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 32]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 32]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 31], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.56@digital.justice.gov.uk"], ["subject_id", 32]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.9ms Sent mail to example.user.56@digital.justice.gov.uk (6.6ms) Date: Mon, 13 Oct 2014 10:31:46 +0100 From: support@example.com To: example.user.56@digital.justice.gov.uk Message-ID: <543b9c0288679_e6593fc288c65be472561@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0024 has said that they believe the information on Surname-0025 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 24ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.568728"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 09:31:46.568728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.571156"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 09:31:46.571156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.577383"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.577383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 31]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 31]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 31]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "31"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.581747"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.581747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.583561"], ["group_id", 32], ["person_id", 34], ["updated_at", "2014-10-13 09:31:46.583561"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 34]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.584902' WHERE "people"."id" = 34 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.585551' WHERE "groups"."id" = 32  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"34"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 33]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '34' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 34]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 34]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 33], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.58@digital.justice.gov.uk"], ["subject_id", 34]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.4ms Sent mail to example.user.58@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 10:31:46 +0100 From: support@example.com To: example.user.58@digital.justice.gov.uk Message-ID: <543b9c0291c2e_e6593fc288c65be472637@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0026 has said that they believe the information on Surname-0027 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 14ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.605434"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 09:31:46.605434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.607983"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 09:31:46.607983"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.615806"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.615806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 33]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 33]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 33]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "33"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.620552"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.620552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.622670"], ["group_id", 34], ["person_id", 36], ["updated_at", "2014-10-13 09:31:46.622670"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 36]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.624237' WHERE "people"."id" = 36 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.624984' WHERE "groups"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"36"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 35]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '36' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 36]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 36]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 35], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.60@digital.justice.gov.uk"], ["subject_id", 36]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to example.user.60@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:31:46 +0100 From: support@example.com To: example.user.60@digital.justice.gov.uk Message-ID: <543b9c029b690_e6593fc288c65be4727a4@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0028 has said that they believe the information on Surname-0029 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.645803"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 09:31:46.645803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.648217"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 09:31:46.648217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.654376"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.654376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 35]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 35]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 35]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "35"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.658605"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.658605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.660414"], ["group_id", 36], ["person_id", 38], ["updated_at", "2014-10-13 09:31:46.660414"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 38]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.661701' WHERE "people"."id" = 38 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.662327' WHERE "groups"."id" = 36  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"38"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 37]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '38' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 38]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 38]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 37], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.62@digital.justice.gov.uk"], ["subject_id", 38]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.5ms Sent mail to example.user.62@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:31:46 +0100 From: support@example.com To: example.user.62@digital.justice.gov.uk Message-ID: <543b9c02a475b_e6593fc288c65be472832@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0030 has said that they believe the information on Surname-0031 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.682320"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 09:31:46.682320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.684856"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 09:31:46.684856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.691101"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.691101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 37]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 37]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 37]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "37"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.695417"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.695417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:46.697220"], ["group_id", 38], ["person_id", 40], ["updated_at", "2014-10-13 09:31:46.697220"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 40]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:46.698539' WHERE "people"."id" = 40 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:46.699177' WHERE "groups"."id" = 38  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"40"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 39]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '40' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 40]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 40]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 39], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.64@digital.justice.gov.uk"], ["subject_id", 40]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to example.user.64@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 10:31:46 +0100 From: support@example.com To: example.user.64@digital.justice.gov.uk Message-ID: <543b9c02ad7ec_e6593fc288c65be47293@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0032 has said that they believe the information on Surname-0033 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 14ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 40]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.719713"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 09:31:46.719713"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.721989"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 09:31:46.721989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"42"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 41]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '42' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 42]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 42]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.732623"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 09:31:46.732623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.739153"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.739153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 39]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 39]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 39]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "39"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.743396"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.743396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0031"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 43]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0031' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (40) ORDER BY people.surname Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.757577"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 09:31:46.757577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 44]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.764742"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 09:31:46.764742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.770774"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.770774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 45]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.777302"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 09:31:46.777302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.782732"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.782732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 42]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 42]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 42]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "42"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.787389"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.787389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 46]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.794514"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 09:31:46.794514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.801202"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.801202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "44"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.805538"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.805538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0034", "team_email_address"=>"example.user.73@digital.justice.gov.uk"}, "id"=>"group-0033"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 47]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0033' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (45) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 44]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 45) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0034' AND "groups"."id" != 45) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 45 [["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.815924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0034 Completed 302 Found in 9ms (ActiveRecord: 2.5ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 45]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.820860"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 09:31:46.820860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.827507"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.827507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 46]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 46]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 46]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "46"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.831993"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.831993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0035", "team_email_address"=>"example.user.74@digital.justice.gov.uk"}, "id"=>"group-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 48]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0035' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (47) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0035' AND "groups"."id" != 47) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0035 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.844936"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 09:31:46.844936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.851622"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.851622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 48]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 48]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 48]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "48"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.855867"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.855867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0036", "team_email_address"=>"example.user.76@digital.justice.gov.uk"}, "id"=>"group-0036"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 49]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0036' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (49) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0036' AND "groups"."id" != 49) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0036 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.868345"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 09:31:46.868345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.879261"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.879261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "50"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.886913"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.886913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0037"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 50]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0037' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (51) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 50]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 51) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 51) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 3.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (1.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.908234"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 09:31:46.908234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.921145"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.921145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "52"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.925439"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.925439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0038"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 51]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0038' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (53) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 52]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 53) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 53) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.938599"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 09:31:46.938599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.945274"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.945274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "54"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:46.949626"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.949626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0039"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 52]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0039' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (55) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 54]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 55) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 55) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.964005"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 09:31:46.964005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 53]] Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.971067"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 09:31:46.971067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 54]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.977496"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 09:31:46.977496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0040", "team_email_address"=>"example.user.84@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 55]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.983456"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.983456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0040 Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.988016"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 09:31:46.988016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0041", "team_email_address"=>"example.user.85@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 56]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:46.993102"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:46.993102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0041 Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.000722"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 09:31:47.000722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0042", "team_email_address"=>"example.user.86@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 57]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.007226"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.007226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0042 Completed 302 Found in 5ms (ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.012497"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 09:31:47.012497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 58]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.021735"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 09:31:47.021735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 59]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.030692"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 09:31:47.030692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 60]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.040418"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 09:31:47.040418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.047036"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.047036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 59]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 59]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 59]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "59"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:47.051399"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.051399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0043"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 61]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0043' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (60) ORDER BY people.surname Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.061543"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 09:31:47.061543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.068213"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.068213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 61]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 61]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 61]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "61"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:47.072589"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.072589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0044"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 62]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0044' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (62) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 61]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 61]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '61/62/%' OR "groups"."ancestry" = '61/62')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '61/62' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 62]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.2ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.087541"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 09:31:47.087541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.090654"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.090654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 63]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 63]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 63]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "63"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:47.095176"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.095176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0046"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 63]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0046' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (64) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 63]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 63]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '63/64/%' OR "groups"."ancestry" = '63/64')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '63/64' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 64]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0045 Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0057' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.107460"], ["slug", "surname-0057"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 09:31:47.107460"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.111055"], ["slug", "surname-0058"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 09:31:47.111055"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 65 [["updated_at", "2014-10-13 09:31:47.112261"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0059' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:47.115277"], ["slug", "surname-0059"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 09:31:47.115277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:47.121789"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:47.121789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:31:47.124497"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:31:47.124497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 67]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:31:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:31:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:48.150927"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:31:48.150927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 68]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 68]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 68]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (68) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.3ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:31:48 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 68]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 10:31:48 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 68]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (67) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 67]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 13.7ms | ActiveRecord: 0.9ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:48.335583"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 09:31:48.335583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:48.339502"], ["slug", "surname-0061"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 09:31:48.339502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:48.346001"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:48.346001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 66]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 66]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 66]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "66"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:48.354072"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:48.354072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:48.356780"], ["group_id", 67], ["person_id", 70], ["updated_at", "2014-10-13 09:31:48.356780"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:48.358174' WHERE "people"."id" = 70 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:48.359464' WHERE "groups"."id" = 67  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"11"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 69]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 11]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 11]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 70]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:48.365427' WHERE "people"."id" = 70 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 67]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:48.369721' WHERE "groups"."id" = 67  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 11]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:48.375515"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 09:31:48.375515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0063' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:48.378137"], ["slug", "surname-0063"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 09:31:48.378137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:48.384363"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:48.384363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 68]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 68]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 68]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0048-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "68"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:48.389373"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:48.389373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:48.390601"], ["group_id", 69], ["person_id", 72], ["updated_at", "2014-10-13 09:31:48.390601"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:48.391234' WHERE "people"."id" = 72 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:48.391842' WHERE "groups"."id" = 69  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"12"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 71]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 12]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 12]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 72]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:48.397714' WHERE "people"."id" = 72 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 69]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:48.399186' WHERE "groups"."id" = 69  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0064' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:48.743969"], ["image", "placeholder.png"], ["slug", "surname-0064"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 09:31:48.743969"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0065' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.145580"], ["image", "placeholder.png"], ["slug", "surname-0065"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 09:31:49.145580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.630224"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 09:31:49.630224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.634381"], ["slug", "surname-0067"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 09:31:49.634381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0067"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 75]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0067' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (76) ORDER BY groups.name Completed 200 OK in 8ms (Views: 0.9ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.648494"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 09:31:49.648494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.651659"], ["slug", "surname-0069"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 09:31:49.651659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0069"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 77]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0069' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (78) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.664777"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.664777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 70]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 70]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 70]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "70"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:49.669849"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.669849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.676537"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 09:31:49.676537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0071' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.680082"], ["slug", "surname-0071"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 09:31:49.680082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0071"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 79]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0071' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (80) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.690247"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 09:31:49.690247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0073' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.693387"], ["slug", "surname-0073"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 09:31:49.693387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.699828"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.699828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 72]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 72]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 72]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "72"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:49.704356"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.704356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.705982"], ["group_id", 73], ["person_id", 82], ["updated_at", "2014-10-13 09:31:49.705982"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 82]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:49.707534' WHERE "people"."id" = 82 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:49.708368' WHERE "groups"."id" = 73  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0073"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 81]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (82) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.718664"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 09:31:49.718664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 83]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.724887"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 09:31:49.724887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.728058"], ["slug", "surname-0076"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 09:31:49.728058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0077", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0076"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 84]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0076' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (85) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0077' AND "people"."given_name" IS NULL AND ("people"."id" != 85) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 85 [["surname", "Surname-0077"], ["updated_at", "2014-10-13 09:31:49.736687"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0076 Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 85]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.742895"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 09:31:49.742895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.745975"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 09:31:49.745975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0080", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0079"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 86]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0079' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (87) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0080' AND "people"."given_name" IS NULL AND ("people"."id" != 87) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 87 [["surname", "Surname-0080"], ["updated_at", "2014-10-13 09:31:49.754650"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0079 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.760388"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 09:31:49.760388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0082' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.763614"], ["slug", "surname-0082"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 09:31:49.763614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0083", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0082"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 88]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0082' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (89) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0083' AND "people"."given_name" IS NULL AND ("people"."id" != 89) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 89 [["surname", "Surname-0083"], ["updated_at", "2014-10-13 09:31:49.772365"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0082 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.777944"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 09:31:49.777944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0085' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.781115"], ["slug", "surname-0085"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 09:31:49.781115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0086", "image"=>"#"}, "id"=>"surname-0085"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 90]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0085' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (91) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0086' AND "people"."given_name" IS NULL AND ("people"."id" != 91) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 91]] SQL (0.2ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 91 [["image", nil], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 09:31:49.789450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0085/image/edit Completed 302 Found in 8ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.795586"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 09:31:49.795586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0088' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.798846"], ["slug", "surname-0088"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 09:31:49.798846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0088"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 92]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0088' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (93) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.811467"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 09:31:49.811467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.814761"], ["slug", "surname-0090"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 09:31:49.814761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0090"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 94]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0090' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (95) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.825612"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 09:31:49.825612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.829133"], ["slug", "surname-0092"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 09:31:49.829133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0092"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 96]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (97) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.842983"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.842983"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 74]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 74]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 74]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "74"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:49.847692"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.847692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.852167"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 09:31:49.852167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.855395"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 09:31:49.855395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0094"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 98]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (99) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.866530"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 09:31:49.866530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.869072"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:31:49.869072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.871540"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:31:49.871540"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 100]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (102) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 102) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.883243"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 09:31:49.883243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 103]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.892353"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 09:31:49.892353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 104]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.899482"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 09:31:49.899482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 105]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.909199"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.909199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 76]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 76]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 76]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "76"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:49.913810"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.913810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.918372"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 09:31:49.918372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0100"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 106]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0100' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0100' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.925525"], ["slug", "surname-0100"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 09:31:49.925525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0100 Completed 302 Found in 6ms (ActiveRecord: 1.1ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.931178"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 09:31:49.931178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0102"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 108]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0102' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0102' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.937757"], ["slug", "surname-0102"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 09:31:49.937757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0102 Completed 302 Found in 6ms (ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.943179"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 09:31:49.943179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0104"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 110]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0104' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0104' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:49.949323"], ["slug", "surname-0104"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 09:31:49.949323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0104 Completed 302 Found in 5ms (ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.955298"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 09:31:49.955298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0106", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 112]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0106' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0106' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.961788"], ["image", nil], ["slug", "surname-0106"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 09:31:49.961788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0106/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.968325"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 09:31:49.968325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 114]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.977137"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 09:31:49.977137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 115]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.985415"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 09:31:49.985415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 116]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:49.996454"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:49.996454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 78]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 78]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 78]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "78"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:50.001390"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.001390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.006250"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 09:31:50.006250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 117]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.015156"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 09:31:50.015156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.017564"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:31:50.017564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 118]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.026971"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 09:31:50.026971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0113' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.030257"], ["slug", "surname-0113"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 09:31:50.030257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0113"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 120]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0113' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (121) ORDER BY groups.name Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.041759"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 09:31:50.041759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0115' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.046067"], ["slug", "surname-0115"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 09:31:50.046067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0115"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 122]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0115' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (123) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 123]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.058617"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 09:31:50.058617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0117' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.061956"], ["slug", "surname-0117"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 09:31:50.061956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0117"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 124]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0117' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (125) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 125]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.072601"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 09:31:50.072601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0119' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.076531"], ["slug", "surname-0119"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 09:31:50.076531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0119"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 126]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (127) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 127]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.087728"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 09:31:50.087728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 128]] Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.098546"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 09:31:50.098546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 129]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.109476"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.109476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 80]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 80]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 80]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "80"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:50.114561"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.114561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.119209"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 09:31:50.119209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0123' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.122108"], ["slug", "surname-0123"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 09:31:50.122108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0123"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 130]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0123' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (131) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.132652"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 09:31:50.132652"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0125' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.135219"], ["slug", "surname-0125"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 09:31:50.135219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0125"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 132]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0125' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (133) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.148596"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.148596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 82]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 82]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 82]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0055-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "82"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:50.154347"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.154347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:50.165393"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:31:50.165393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 134]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 134]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 134]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (134) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.217681"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.217681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 84]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 84]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 84]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "84"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:50.223162"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.223162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 85]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 85]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 85]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "84/85"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:31:50.228963"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.228963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 86]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 86]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 86]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "84/85/86"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:31:50.235001"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.235001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.238160"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:31:50.238160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.239936"], ["group_id", 85], ["person_id", 135], ["updated_at", "2014-10-13 09:31:50.239936"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:50.240610' WHERE "people"."id" = 135 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:50.241284' WHERE "groups"."id" = 85  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.243765"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:31:50.243765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.245380"], ["group_id", 85], ["person_id", 136], ["updated_at", "2014-10-13 09:31:50.245380"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:50.246048' WHERE "people"."id" = 136 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:50.246702' WHERE "groups"."id" = 85  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.249006"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:31:50.249006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:31:50.250389"], ["group_id", 85], ["person_id", 137], ["updated_at", "2014-10-13 09:31:50.250389"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:31:50.250974' WHERE "people"."id" = 137 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:31:50.251533' WHERE "groups"."id" = 85  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 134]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (85) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (84, 85) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 85]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (9.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '84/85' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '84/85' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '84/85' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 25.5ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:31:50.296534"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:31:50.296534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 138]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 138]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (138) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:31:50.341194"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.341194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 88]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 88]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 88]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "88"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:31:50.346092"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.346092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 89]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 89]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 89]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "88/89"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:31:50.350758"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.350758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 90]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 90]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 90]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "88/89/90"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:31:50.355770"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:31:50.355770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (88) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (88) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 88]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.9ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (89) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (88, 89) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 89]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 2.0ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 10:31:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (90) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (88, 89, 90) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 90]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89/90' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89/90' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '88/89/90' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0001' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.680484"], ["slug", "surname-0001"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 09:40:01.680484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.700145"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.700145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 92]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 92]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 92]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "92"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.706051"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.706051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.708001"], ["group_id", 93], ["person_id", 139], ["updated_at", "2014-10-13 09:40:01.708001"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:01.718979' WHERE "people"."id" = 139 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:01.719722' WHERE "groups"."id" = 93  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.725533"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 09:40:01.725533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.731825"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.731825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 94]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 94]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 94]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "94"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.736426"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.736426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.737690"], ["group_id", 95], ["person_id", 140], ["updated_at", "2014-10-13 09:40:01.737690"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:01.738357' WHERE "people"."id" = 140 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:01.738974' WHERE "groups"."id" = 95  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.748444"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 09:40:01.748444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.754573"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.754573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 96]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 96]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 96]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "96"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.759227"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.759227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:01.760622"], ["group_id", 97], ["person_id", 141], ["updated_at", "2014-10-13 09:40:01.760622"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:01.761322' WHERE "people"."id" = 141 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:01.761944' WHERE "groups"."id" = 97  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.776667"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.776667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 98]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 98]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 98]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "98"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.781485"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.781485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 99]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 99]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 99]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "98/99"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:01.786107"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.786107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 100]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 100]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 100]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "98/99/100"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:01.790718"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.790718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (98, 99, 100, 101) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.798771"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.798771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 102]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 102]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 102]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "102"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.803584"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.803584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.808036"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.808036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (104) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.816974"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.816974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 105]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 105]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 105]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "105"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.821108"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.821108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 106]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 106]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 106]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "105/106"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:01.825580"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.825580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 107]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 107]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 107]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "105/106/107"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:01.832028"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.832028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0010' AND "groups"."id" != 106) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.839519"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.839519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 109]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 109]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 109]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "109"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.844110"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.844110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.851956"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.851956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "111"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.856374"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.856374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 111]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 112) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 112) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 112 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 09:40:01.860705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 112]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.869051"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.869051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "113"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.873464"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.873464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 113) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 113 [["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.876191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 113]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "113"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.881285"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.881285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.890463"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.890463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "116"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.894856"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.894856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 116) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 116 [["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.897693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "116"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.902793"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.902793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 116) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 116 [["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.905596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 116]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "116"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.911046"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.911046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.919967"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.919967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 120]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 120]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 120]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "120"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.924425"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.924425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '120/121/%' OR "groups"."ancestry" = '120/121'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.939516"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.939516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 122]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 122]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 122]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "122"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.944148"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.944148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '122/123/%' OR "groups"."ancestry" = '122/123')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 123]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 123]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.955102"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.955102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 124]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 124]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 124]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0015-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "124"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.959510"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.959510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '124/125' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 125]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.978112"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.978112"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 126]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 126]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 126]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "126"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:01.982700"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.982700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 127]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "126/127"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:01.987317"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.987317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 127]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '126/127' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:01.996175"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:01.996175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 129]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "129"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.000639"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.000639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.003487"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 09:40:02.003487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.005009"], ["group_id", 130], ["person_id", 142], ["updated_at", "2014-10-13 09:40:02.005009"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.005721' WHERE "people"."id" = 142 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 130]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.007418' WHERE "groups"."id" = 130  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '129/130' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 130]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.018076"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.018076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 131]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 131]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 131]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "131"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.022740"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.022740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.025553"], ["slug", "surname-0005"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 09:40:02.025553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.026970"], ["group_id", 132], ["person_id", 143], ["updated_at", "2014-10-13 09:40:02.026970"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.027579' WHERE "people"."id" = 143 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 132]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.028867' WHERE "groups"."id" = 132  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '131/132' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 132]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.038947"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.038947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 133]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "133"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.043407"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.043407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.049988"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:40:02.049988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.052050"], ["group_id", 134], ["person_id", 144], ["updated_at", "2014-10-13 09:40:02.052050"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.052734' WHERE "people"."id" = 144 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 134]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.054128' WHERE "groups"."id" = 134  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 134 OR "groups"."ancestry" ILIKE '133/134/%') OR "groups"."ancestry" = '133/134')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.5ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (134) group by p.id;  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.065036"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.065036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 135]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 135]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 135]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "135"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.069594"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.069594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.072556"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:40:02.072556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.074428"], ["group_id", 136], ["person_id", 145], ["updated_at", "2014-10-13 09:40:02.074428"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.075480' WHERE "people"."id" = 145 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 136]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.076924' WHERE "groups"."id" = 136  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 136]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 136]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 136]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "135/136"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:02.081732"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.081732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.084579"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:40:02.084579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.086381"], ["group_id", 137], ["person_id", 146], ["updated_at", "2014-10-13 09:40:02.086381"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.086993' WHERE "people"."id" = 146 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 137]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.088294' WHERE "groups"."id" = 137  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 136 OR "groups"."ancestry" ILIKE '135/136/%') OR "groups"."ancestry" = '135/136')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (136,137) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.097395"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.097395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 138]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 138]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "138"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.102159"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.102159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.105270"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:40:02.105270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.107312"], ["group_id", 139], ["person_id", 147], ["updated_at", "2014-10-13 09:40:02.107312"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.107937' WHERE "people"."id" = 147 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 139]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.109201' WHERE "groups"."id" = 139  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 139]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "138/139"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:02.114274"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.114274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.117266"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:40:02.117266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.119015"], ["group_id", 140], ["person_id", 148], ["updated_at", "2014-10-13 09:40:02.119015"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.119592' WHERE "people"."id" = 148 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 140]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.120804' WHERE "groups"."id" = 140  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.122349"], ["group_id", 140], ["person_id", 148], ["updated_at", "2014-10-13 09:40:02.122349"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.122912' WHERE "people"."id" = 148 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 140]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.124041' WHERE "groups"."id" = 140  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 139 OR "groups"."ancestry" ILIKE '138/139/%') OR "groups"."ancestry" = '138/139')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (139,140) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.132588"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.132588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 141]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 141]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 141]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "141"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.137024"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.137024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.139960"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:40:02.139960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.142308"], ["group_id", 142], ["person_id", 149], ["updated_at", "2014-10-13 09:40:02.142308"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.142986' WHERE "people"."id" = 149 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 142]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.144328' WHERE "groups"."id" = 142  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 142]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 142]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 142]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "141/142"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:02.149179"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.149179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.152069"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:40:02.152069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.153881"], ["group_id", 143], ["person_id", 150], ["updated_at", "2014-10-13 09:40:02.153881"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.154492' WHERE "people"."id" = 150 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 143]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.155702' WHERE "groups"."id" = 143  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.157231"], ["group_id", 143], ["person_id", 150], ["updated_at", "2014-10-13 09:40:02.157231"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.157838' WHERE "people"."id" = 150 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 143]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.158994' WHERE "groups"."id" = 143  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 142 OR "groups"."ancestry" ILIKE '141/142/%') OR "groups"."ancestry" = '141/142')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (142,143) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.167570"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.167570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.174461"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.174461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "145"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.228108"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.228108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 145]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.239980"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.239980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 147]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 147]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 147]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "147"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.246846"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.246846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0006' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.249661"], ["slug", "surname-0006"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 09:40:02.249661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.251026"], ["group_id", 148], ["leader", "t"], ["person_id", 151], ["updated_at", "2014-10-13 09:40:02.251026"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.251857' WHERE "people"."id" = 151 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.252554' WHERE "groups"."id" = 148  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 148]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.261318"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.261318"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 149]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 149]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 149]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "149"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.267058"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.267058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '149/150' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.277524"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.277524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 151]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 151]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 151]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "151"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.282204"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.282204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '151/152' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.289564"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.289564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 153]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 153]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 153]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "153"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.294255"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.294255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 153]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '153'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.302028"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.302028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.308656"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.308656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '156'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.316257"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 09:40:02.316257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 152]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/errors/internal_server_error.html.haml within layouts/peoplefinder/home (0.4ms) Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.333771"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 09:40:02.333771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 153]] Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.342174"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 09:40:02.342174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 154]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.353639"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.353639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 157]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 157]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 157]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "157"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.358708"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.358708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0031" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0031"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (32.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (18.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.4ms) Completed 200 OK in 96ms (Views: 93.7ms | ActiveRecord: 1.8ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:02.486785"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:02.486785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0031 Completed 302 Found in 8ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0031" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0031"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 155]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0031' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (158) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (157, 158) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (6.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 158]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (7.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '157/158' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '157/158' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 158]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 28.2ms | ActiveRecord: 3.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:02.557338"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:02.557338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 156]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 156]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 156]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (156) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (52.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 70ms (Views: 65.3ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.696612"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 09:40:02.696612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0011' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.699302"], ["slug", "surname-0011"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 09:40:02.699302"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.707347"], ["event", "create"], ["item_id", 158], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0011\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.714688"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.714688"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.717270"], ["event", "create"], ["item_id", 159], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.72@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 159]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 159]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 159]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "159"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.722062"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.722062"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.723951"], ["event", "create"], ["item_id", 160], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0032\nteam_email_address:\n- \n- example.user.71@digital.justice.gov.uk\nancestry:\n- \n- '159'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.725235"], ["group_id", 160], ["person_id", 158], ["updated_at", "2014-10-13 09:40:02.725235"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.727415"], ["event", "create"], ["item_id", 32], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 158\ngroup_id:\n- \n- 160\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.728311' WHERE "people"."id" = 158 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.729087' WHERE "groups"."id" = 160  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 32]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.731366"], ["event", "destroy"], ["item_id", 32], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 32\ngroup_id: 160\nperson_id: 158\nrole: \ncreated_at: &1 2014-10-13 09:40:02.725235000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 32], ["item_type", "Peoplefinder::Membership"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.733343' WHERE "people"."id" = 158 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.733914' WHERE "groups"."id" = 160  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"19"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 157]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 19]] Redirected to http://test.host/audit_trail Completed 302 Found in 7ms (ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 32]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.747968"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 09:40:02.747968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0013' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.750669"], ["slug", "surname-0013"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 09:40:02.750669"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.752340"], ["event", "create"], ["item_id", 160], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0013\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.758792"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.758792"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.760401"], ["event", "create"], ["item_id", 161], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.74@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 161]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 161]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 161]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "161"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:02.765115"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:02.765115"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.766857"], ["event", "create"], ["item_id", 162], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0033\nteam_email_address:\n- \n- example.user.73@digital.justice.gov.uk\nancestry:\n- \n- '161'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.768125"], ["group_id", 162], ["person_id", 160], ["updated_at", "2014-10-13 09:40:02.768125"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.769573"], ["event", "create"], ["item_id", 33], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 160\ngroup_id:\n- \n- 162\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:02.770231' WHERE "people"."id" = 160 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:02.770875' WHERE "groups"."id" = 162  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"23"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 159]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 23]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 33]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.778581"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 09:40:02.778581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.781391"], ["slug", "surname-0015"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 09:40:02.781391"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.783129"], ["event", "create"], ["item_id", 162], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0015\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"24"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 161]] Peoplefinder::Version Load (0.4ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 24]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 162]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 162]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 162]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:02.795077"], ["event", "destroy"], ["item_id", 162], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 162\ngiven_name: \nsurname: Surname-0015\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:40:02.781391000 Z\nupdated_at: 2014-10-13 09:40:02.781391000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0014"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 162], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 12ms (ActiveRecord: 2.1ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 162]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.801758"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 09:40:02.801758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.804215"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:40:02.804215"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.805815"], ["event", "create"], ["item_id", 164], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 164]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 164]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.809913"], ["event", "destroy"], ["item_id", 164], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 164\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 09:40:02.804215000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 164], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"27"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 163]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 27]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 164]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 164) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.804215"], ["id", 164], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:40:02.818049"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:02.819801"], ["event", "create"], ["item_id", 164], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.827113"], ["updated_at", "2014-10-13 09:40:02.827113"], ["user_email", "example.user.75@digital.justice.gov.uk"], ["value", "dad22215-bf49-467d-a5a1-a559247e5e18"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 6]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.842996"], ["updated_at", "2014-10-13 09:40:02.842996"], ["user_email", "example.user.77@digital.justice.gov.uk"], ["value", "be8228fa-ce84-4d16-82bf-765fe5d74664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.849582"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 09:40:02.849582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.854144"], ["updated_at", "2014-10-13 09:40:02.854144"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "221c8c50-01a1-45a1-bea2-f6d9fffc2f53"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.861251"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 09:40:02.861251"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.865729"], ["updated_at", "2014-10-13 09:40:02.865729"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3aaa5006-a907-41ef-a478-e374ac00c3cb"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 166]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 15.0ms Sent mail to test.user@digital.justice.gov.uk (6.7ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9df2d6cac_e7f33fe5a4c65bf0573a0@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/3aaa5006-a907-41ef-a478-e374ac00c3cb?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.889052"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 09:40:02.889052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.892997"], ["updated_at", "2014-10-13 09:40:02.892997"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "f2902302-8865-4aa7-bbb5-d9d70237f789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 167]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.1ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9df2dbfc2_e7f33fe5a4c65bf0574c@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/f2902302-8865-4aa7-bbb5-d9d70237f789?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.909335"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 09:40:02.909335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.913101"], ["updated_at", "2014-10-13 09:40:02.913101"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "fca88970-7687-41f7-8968-473225c48579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 168]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.0ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9df2e0e83_e7f33fe5a4c65bf0575c6@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/fca88970-7687-41f7-8968-473225c48579?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.929709"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 09:40:02.929709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.933597"], ["updated_at", "2014-10-13 09:40:02.933597"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "47cb1d33-a7c0-473a-8bbd-524928cfcb3f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 169]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.1ms Sent mail to test.user@digital.justice.gov.uk (4.6ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9df2e5eb1_e7f33fe5a4c65bf0576b8@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/47cb1d33-a7c0-473a-8bbd-524928cfcb3f?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:02.950567"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 09:40:02.950567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.954450"], ["updated_at", "2014-10-13 09:40:02.954450"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "c1706913-678c-421a-aa58-9a0cf0610c70"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 170]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.7ms Sent mail to test.user@digital.justice.gov.uk (4.5ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9df2eb219_e7f33fe5a4c65bf0577af@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/c1706913-678c-421a-aa58-9a0cf0610c70?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.970993"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:40:02.970993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:02.973586"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:40:02.973586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 172], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 171]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.7ms Sent mail to recipient@example.com (16.9ms) Date: Mon, 13 Oct 2014 10:40:02 +0100 From: support@example.com To: recipient@example.com Message-ID: <543b9df2f14fa_e7f33fe5a4c65bf05782d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.011571"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:40:03.011571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.015349"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:40:03.015349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 174], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 173]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.8ms Sent mail to recipient@example.com (5.0ms) Date: Mon, 13 Oct 2014 10:40:03 +0100 From: support@example.com To: recipient@example.com Message-ID: <543b9df35b9b_e7f33fe5a4c65bf0579e5@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.031960"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:40:03.031960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.034490"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:40:03.034490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 176], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 175]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.2ms Sent mail to recipient@example.com (4.7ms) Date: Mon, 13 Oct 2014 10:40:03 +0100 From: support@example.com To: recipient@example.com Message-ID: <543b9df3a2b5_e7f33fe5a4c65bf0580e2@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.050053"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:40:03.050053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.052975"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:40:03.052975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 178], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 177]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.3ms Sent mail to recipient@example.com (4.3ms) Date: Mon, 13 Oct 2014 10:40:03 +0100 From: support@example.com To: recipient@example.com Message-ID: <543b9df3eb4c_e7f33fe5a4c65bf0581a8@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.068432"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:40:03.068432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:03.070937"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:40:03.070937"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 180], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 179]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.3ms Sent mail to recipient@example.com (4.5ms) Date: Mon, 13 Oct 2014 10:40:03 +0100 From: support@example.com To: recipient@example.com Message-ID: <543b9df3130ea_e7f33fe5a4c65bf058288@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:03.088488"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 09:40:03.088488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0024' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:03.092745"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0024"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 09:40:03.092745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0025' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:03.386765"], ["image", "placeholder.png"], ["slug", "surname-0025"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 09:40:03.386765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0026' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:03.777633"], ["image", "placeholder.png"], ["slug", "surname-0026"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 09:40:03.777633"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.267021"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:04.267021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:04.270873"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:40:04.270873"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.282913"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:40:04.282913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.286862"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:40:04.286862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:04.297971"], ["slug", "surname-0027"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 09:40:04.297971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:04.301669"], ["slug", "surname-0028"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 09:40:04.301669"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:04.305477"], ["slug", "surname-0029"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 09:40:04.305477"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 191 [["updated_at", "2014-10-13 09:40:04.306845"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.318140"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:04.318140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 192]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (192) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 34.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:04.422772"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:04.422772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (193) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 192]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (193) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.3ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.523313"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:04.523313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 194]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 20ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (194) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.7ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.4ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:04.624967"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:04.624967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 15ms (ActiveRecord: 1.5ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.3ms | ActiveRecord: 0.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (195) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 194]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (195) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.733765"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:04.733765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 196]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 196]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 196]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (196) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 196]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 196]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 25.2ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:04.875166"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:04.875166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 197]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 19ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (197) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:04.920377"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:04.920377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 198]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 16.1ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:04 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 197]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 18.1ms | ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:05.025756"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:05.025756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 199]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 199]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 199]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (199) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.4ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:05.071272"], ["slug", "surname-0030"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 09:40:05.071272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0030/edit" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0030"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 199]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0030' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (200) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:05.123175"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:05.123175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 201]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (201) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:05.168853"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:05.168853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:05.171465"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:40:05.171465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (203) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.5ms | ActiveRecord: 1.0ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (203) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 203) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 202]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 9.5ms | ActiveRecord: 1.7ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (203) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 203 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:05.261159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (203) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:05.290471"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:05.290471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 204]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (204) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:05.338946"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:05.338946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (205) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (205) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (205) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 205) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 205 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:05.415479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 204]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (205) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:05.446749"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:05.446749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 206]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (206) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:05.495127"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:05.495127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 163]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 163]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 163]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "163"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:05.500120"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:05.500120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:05.502838"], ["slug", "surname-0031"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 09:40:05.502838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:05.505394"], ["group_id", 164], ["person_id", 207], ["updated_at", "2014-10-13 09:40:05.505394"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 207]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:05.506878' WHERE "people"."id" = 207 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:05.507786' WHERE "groups"."id" = 164  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0031" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0031"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0031' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (207) ORDER BY groups.name Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (163, 164) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (163, 164) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.2ms | ActiveRecord: 1.9ms) Started GET "/people/surname-0031/reported_profiles/new" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0031"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0031' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 14.5ms | ActiveRecord: 0.7ms) Started POST "/people/surname-0031/reported_profiles" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0031"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0031' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 207]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 206], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.78@digital.justice.gov.uk"], ["subject_id", 207]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 18.4ms Sent mail to example.user.78@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:40:05 +0100 From: support@example.com To: example.user.78@digital.justice.gov.uk Message-ID: <543b9df58f2af_e7f33fe5a4c65bf058389@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0031 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0031 Redirected to http://www.example.com/people/surname-0031 Completed 302 Found in 30ms (ActiveRecord: 1.2ms) Started GET "/people/surname-0031" for 127.0.0.1 at 2014-10-13 10:40:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0031"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 206]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0031' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (207) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (163, 164) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (163, 164) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:07.211412"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:07.211412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 165]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 165]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 165]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "165"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:07.218983"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:07.218983"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:07.224468"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:07.224468"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 10:40:07 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:08.171807"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:08.171807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 209]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (209) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 35ms (Views: 31.2ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"166", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 208]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 11.9ms | ActiveRecord: 1.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"166"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413193208-59379-1462/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 09:40:08.613786"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-aea4132d-7227-4461-814c-3242c979d21c"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:08.613786"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:08.615437"], ["group_id", 166], ["person_id", 210], ["role", ""], ["updated_at", "2014-10-13 09:40:08.615437"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 210]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:08.617341' WHERE "people"."id" = 210 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 166]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:08.619019' WHERE "groups"."id" = 166  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/marco-polo-aea4132d-7227-4461-814c-3242c979d21c/image/edit Completed 302 Found in 20ms (ActiveRecord: 2.2ms) Started GET "/people/marco-polo-aea4132d-7227-4461-814c-3242c979d21c/image/edit" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-aea4132d-7227-4461-814c-3242c979d21c"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-aea4132d-7227-4461-814c-3242c979d21c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.7ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started PUT "/people/marco-polo-aea4132d-7227-4461-814c-3242c979d21c/image" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-aea4132d-7227-4461-814c-3242c979d21c"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-aea4132d-7227-4461-814c-3242c979d21c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:62902/people/marco-polo-aea4132d-7227-4461-814c-3242c979d21c?cache_bust=1413193208 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-aea4132d-7227-4461-814c-3242c979d21c?cache_bust=1413193208" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413193208", "id"=>"marco-polo-aea4132d-7227-4461-814c-3242c979d21c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 209]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-aea4132d-7227-4461-814c-3242c979d21c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (210) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (165, 166) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (165, 166) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 1.5ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:08.855260"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:08.855260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 211]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (211) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:08.901173"], ["slug", "surname-0032"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 09:40:08.901173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0032/edit" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0032"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0032' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (212) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.3ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0032" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0032"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0032' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (212) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 212]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 211]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 212]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:08.977481"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:08.977481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 213]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 213]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 213]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (213) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:09.025818"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:09.025818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 213]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (214) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 213]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (214) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 213]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (214) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:09.151358"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:09.151358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 215]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 215]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 215]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (215) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:09.199298"], ["slug", "surname-0033"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 09:40:09.199298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:09.205941"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:09.205941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 167]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 167]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 167]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "167"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:09.210642"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:09.210642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:09.211975"], ["group_id", 168], ["person_id", 216], ["updated_at", "2014-10-13 09:40:09.211975"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:09.212653' WHERE "people"."id" = 216 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:09.213316' WHERE "groups"."id" = 168  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0033/edit" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0033"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 215]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0033' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (216) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (167, 168) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (167, 168) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 216]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.5ms) Started DELETE "/people/surname-0033" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0033"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 215]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0033' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (216) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 36]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 216]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:09.268274' WHERE "people"."id" = 216 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:09.269024' WHERE "groups"."id" = 168 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 216]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 215]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 36]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 216]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:09.293428"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:09.293428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 217]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 217]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 217]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (217) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 217]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.5ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:09.388339"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:09.388339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 169]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 169]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 169]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "169"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:09.393211"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:09.393211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:09.813299"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:09.813299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 218]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (218) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:09 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.8ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"170", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 09:40:10.155149"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:10.155149"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:10.156601"], ["group_id", 170], ["person_id", 219], ["role", ""], ["updated_at", "2014-10-13 09:40:10.156601"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 219]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:10.158421' WHERE "people"."id" = 219 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 170]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:10.160064' WHERE "groups"."id" = 170  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/marco-polo/image/edit Completed 302 Found in 19ms (ActiveRecord: 2.4ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:62902/people/marco-polo?cache_bust=1413193210 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) Started GET "/people/marco-polo?cache_bust=1413193210" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413193210", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 218]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (219) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (169, 170) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (169, 170) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 15.3ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:10.371204"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:10.371204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 171]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 171]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 171]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "171"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:10.375701"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:10.375701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0034' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:10.378363"], ["slug", "surname-0034"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 09:40:10.378363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:10.806826"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:10.806826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 221]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (221) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0034/edit" for 127.0.0.1 at 2014-10-13 10:40:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (220) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0034" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0034", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"171", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (220) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0034' AND "people"."given_name" = '' AND ("people"."id" != 220) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 220 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:11.124627"]] SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.125808"], ["group_id", 171], ["person_id", 220], ["role", ""], ["updated_at", "2014-10-13 09:40:11.125808"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 220]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:11.127889' WHERE "people"."id" = 220 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 171]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:11.129409' WHERE "groups"."id" = 171  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/surname-0034 Completed 302 Found in 16ms (ActiveRecord: 3.1ms) Started GET "/people/surname-0034" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (220) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (171) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (171) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0034/edit" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (220) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (171) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (171) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 220]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (14.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 46.1ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 221]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:11.351798"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:11.351798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 222]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 222]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 222]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (222) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.400735"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-2f8236cb-d0ab-4b15-bdcc-d88c509672bd"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 09:40:11.400735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 223]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 223 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:11.405514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.415256"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.415256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 173]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 173]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "173"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:11.419952"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.419952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:11.421984"], ["group_id", 174], ["person_id", 223], ["updated_at", "2014-10-13 09:40:11.421984"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 223]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:11.423539' WHERE "people"."id" = 223 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:11.424237' WHERE "groups"."id" = 174  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-2f8236cb-d0ab-4b15-bdcc-d88c509672bd" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2f8236cb-d0ab-4b15-bdcc-d88c509672bd"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 222]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2f8236cb-d0ab-4b15-bdcc-d88c509672bd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (223) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (173, 174) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (173, 174) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 13.2ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:11.456475"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:11.456475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 224]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 224]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 224]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (224) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.502247"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-81a0bc91-2115-4a4a-a744-15b3d7e8d8f3"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 09:40:11.502247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-81a0bc91-2115-4a4a-a744-15b3d7e8d8f3" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-81a0bc91-2115-4a4a-a744-15b3d7e8d8f3"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 224]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-81a0bc91-2115-4a4a-a744-15b3d7e8d8f3' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (225) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:11.528497"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:11.528497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 226]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.574387"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 09:40:11.574387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (227) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.4ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 2.3ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 227], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:11.628209"], ["updated_at", "2014-10-13 09:40:11.628209"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "2a9d4503-12bf-452d-8a04-26e29eb1b751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 14.5ms Sent mail to someone.else@digital.justice.gov.uk (18.6ms) Date: Mon, 13 Oct 2014 10:40:11 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543b9dfb9c7bf_e7f33fe5a4c65bf05843f@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/2a9d4503-12bf-452d-8a04-26e29eb1b751?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 39ms (ActiveRecord: 1.7ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 226]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (227) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:11.688567"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:11.688567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 228]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 228]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 228]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (228) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.734000"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 09:40:11.734000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 229]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 229 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:40:11.738651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.748726"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.748726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 175]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 175]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 175]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "175"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:11.754708"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.754708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:11.756795"], ["group_id", 176], ["person_id", 229], ["updated_at", "2014-10-13 09:40:11.756795"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 229]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:11.759362' WHERE "people"."id" = 229 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:11.760644' WHERE "groups"."id" = 176  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 228]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (229) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (175, 176) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (175, 176) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:11.792810"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:11.792810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 230]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 230]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 230]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (230) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.838394"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 09:40:11.838394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 231 [["email", nil], ["updated_at", "2014-10-13 09:40:11.839804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:40:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 230]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (231) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.867655"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.867655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 177]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 177]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 177]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "177"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:11.872940"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.872940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 178]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 178]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 178]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "177/178"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:11.878219"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:11.878219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.903460"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 09:40:11.903460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.906205"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 09:40:11.906205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"233"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 232]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '233' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 233]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.914893"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 09:40:11.914893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.917425"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 09:40:11.917425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"235"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 234]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '235' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 235]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.925463"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 09:40:11.925463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.927964"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 09:40:11.927964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"237"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 236]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '237' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 237]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.937395"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 09:40:11.937395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.940179"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 09:40:11.940179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"239"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 238]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '239' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 239]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 239], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:11.948610"], ["updated_at", "2014-10-13 09:40:11.948610"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "1365a747-4d34-4574-b142-c91ae3b3bdbf"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 8.8ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:40:11 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543b9dfbe9388_e7f33fe5a4c65bf0585ed@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/1365a747-4d34-4574-b142-c91ae3b3bdbf?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.963785"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 09:40:11.963785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.966329"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 09:40:11.966329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"241"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 240]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '241' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 241]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 241], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:11.975767"], ["updated_at", "2014-10-13 09:40:11.975767"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "90cbe77e-7ae1-4047-ac06-84cfa3c38bfd"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.5ms Sent mail to someone.else@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 10:40:11 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543b9dfbefe41_e7f33fe5a4c65bf0586f7@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/90cbe77e-7ae1-4047-ac06-84cfa3c38bfd?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 19ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.991092"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 09:40:11.991092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:11.993583"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 09:40:11.993583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"243"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 242]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '243' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 243]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.040721"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.040721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 180]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 180]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 180]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "180"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.045613"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.045613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.049803"], ["updated_at", "2014-10-13 09:40:12.049803"], ["user_email", "example.user.97@digital.justice.gov.uk"], ["value", "dca79132-cf0f-441a-bc80-be2482a164ae"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/dca79132-cf0f-441a-bc80-be2482a164ae" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"dca79132-cf0f-441a-bc80-be2482a164ae"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'dca79132-cf0f-441a-bc80-be2482a164ae' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.97@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-97' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:12.061312"], ["email", "example.user.97@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-97"], ["surname", "user"], ["updated_at", "2014-10-13 09:40:12.061312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 244]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 244]] Redirected to http://www.example.com/people/example-user-97/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/example-user-97/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-97"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 244]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-97' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (244) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.116350"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.116350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 182]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 182]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 182]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "182"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.122086"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.122086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.158102"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.158102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 184]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 184]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 184]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "184"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.162865"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.162865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.166820"], ["updated_at", "2014-10-13 09:40:12.166820"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "7dab7e0b-6542-417c-86d0-1f6c8348e611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/7dab7e0b-6542-417c-86d0-1f6c8348e611" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"7dab7e0b-6542-417c-86d0-1f6c8348e611"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '7dab7e0b-6542-417c-86d0-1f6c8348e611' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:12.174734"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 09:40:12.174734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 245]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 245]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 2.1ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (245) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.246368"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.246368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 186]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 186]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 186]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "186"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.251704"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.251704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.269736"], ["updated_at", "2014-10-13 09:40:12.269736"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "99aa4bff-876f-4999-88ed-82939b9197af"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 9.0ms Sent mail to james.darling@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:40:12 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543b9dfc45419_e7f33fe5a4c65bf05879f@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/99aa4bff-876f-4999-88ed-82939b9197af If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 5.0ms | ActiveRecord: 0.4ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.304715"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.304715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 188]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 188]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 188]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "188"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.309886"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.309886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.313049"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:40:12.313049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.316917"], ["updated_at", "2014-10-13 09:40:12.316917"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "af7644dc-cb12-4eab-8e9c-1b3568a0da2b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/af7644dc-cb12-4eab-8e9c-1b3568a0da2b" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"af7644dc-cb12-4eab-8e9c-1b3568a0da2b"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'af7644dc-cb12-4eab-8e9c-1b3568a0da2b' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 246]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 246]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 0.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 246]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (246) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (40.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 49.8ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.392181"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.392181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 190]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 190]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 190]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "190"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.396675"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.396675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.429446"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.429446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 192]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 192]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 192]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "192"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.433915"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.433915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.437291"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 09:40:12.437291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.441375"], ["updated_at", "2014-10-13 09:40:12.441375"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "948ffd47-e818-49c5-a0a7-5755fdfc187d"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 247]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.6ms Sent mail to test.user@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:40:12 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543b9dfc6dd3d_e7f33fe5a4c65bf05887@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/948ffd47-e818-49c5-a0a7-5755fdfc187d?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/948ffd47-e818-49c5-a0a7-5755fdfc187d?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"948ffd47-e818-49c5-a0a7-5755fdfc187d"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '948ffd47-e818-49c5-a0a7-5755fdfc187d' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.6ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 247]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (247) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:12.517232"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.517232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 194]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 194]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 194]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "194"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:12.523153"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:12.523153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.525978"], ["slug", "surname-0053"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 09:40:12.525978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:12.527924"], ["group_id", 195], ["person_id", 248], ["updated_at", "2014-10-13 09:40:12.527924"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 248]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:12.529292' WHERE "people"."id" = 248 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:12.529966' WHERE "groups"."id" = 195  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:12.973841"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:12.973841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 249]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (249) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started GET "/people/surname-0053/edit" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (248) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (194, 195) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (194, 195) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 248]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.7ms | ActiveRecord: 1.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0053" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0053", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"195", "leader"=>"0", "id"=>"41"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (248) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 248]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 248 AND "memberships"."id" != 41 AND "memberships"."group_id" = 195) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 195 AND "memberships"."id" != 41 AND "memberships"."person_id" = 248) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0053' AND "people"."given_name" = '' AND ("people"."id" != 248) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 248 AND "memberships"."id" != 41 AND "memberships"."group_id" = 195) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 195 AND "memberships"."id" != 41 AND "memberships"."person_id" = 248) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 248 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:13.260372"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 41 [["role", "Head Honcho"], ["updated_at", "2014-10-13 09:40:13.261384"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:13.262137' WHERE "people"."id" = 248 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:13.262734' WHERE "groups"."id" = 195  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/surname-0053 Completed 302 Found in 17ms (ActiveRecord: 3.2ms) Started GET "/people/surname-0053" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (248) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (194, 195) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (194, 195) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 248]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:13.359555"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:13.359555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 196]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 196]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 196]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "196"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:13.365442"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:13.365442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:13.820672"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:13.820672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 250]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (250) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:13 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (9.7ms) Completed 200 OK in 20ms (Views: 18.7ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 250]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:14.172889"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:14.172889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "198"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:14.178832"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:14.178832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0054' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:14.181427"], ["slug", "surname-0054"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 09:40:14.181427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:14.183337"], ["group_id", 199], ["person_id", 251], ["updated_at", "2014-10-13 09:40:14.183337"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 251]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:14.185052' WHERE "people"."id" = 251 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:14.185814' WHERE "groups"."id" = 199  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 198) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 198 [["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:14.188900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 198]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "198"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:14.193710"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:14.193710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:14.634664"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:14.634664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 252]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (252) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0054/edit" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (251) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 199) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 199) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 251]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.8ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership?id=surname-0054" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (251) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Completed 200 OK in 13ms (Views: 6.6ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0054" for 127.0.0.1 at 2014-10-13 10:40:15 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0054", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"199", "leader"=>"0", "id"=>"42"}, "70255588100640"=>{"role"=>"Talker", "group_id"=>"200", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (251) ORDER BY groups.name Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 251]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 251 AND "memberships"."id" != 42 AND "memberships"."group_id" = 199) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 199 AND "memberships"."id" != 42 AND "memberships"."person_id" = 251) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0054' AND "people"."given_name" = '' AND ("people"."id" != 251) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 251 AND "memberships"."id" != 42 AND "memberships"."group_id" = 199) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 199 AND "memberships"."id" != 42 AND "memberships"."person_id" = 251) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 251 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:15.951231"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 42 [["role", ""], ["updated_at", "2014-10-13 09:40:15.952423"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:15.953153' WHERE "people"."id" = 251 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:15.953767' WHERE "groups"."id" = 199 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:15.954490"], ["group_id", 200], ["person_id", 251], ["role", "Talker"], ["updated_at", "2014-10-13 09:40:15.954490"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 251]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:15.956103' WHERE "people"."id" = 251 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 200]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:15.957647' WHERE "groups"."id" = 200  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/surname-0054 Completed 302 Found in 22ms (ActiveRecord: 4.2ms) Started GET "/people/surname-0054" for 127.0.0.1 at 2014-10-13 10:40:15 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 252]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (251) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 200) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 199) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 200) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (198, 199) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 1.9ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 251]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:16.057297"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:16.057297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 253]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 253]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 253]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (253) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:16.108480"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:16.108480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 201]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 201]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 201]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "201"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:16.114929"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:16.114929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:16.117810"], ["slug", "surname-0055"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 09:40:16.117810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:16.119635"], ["group_id", 202], ["person_id", 254], ["updated_at", "2014-10-13 09:40:16.119635"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 254]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:16.120997' WHERE "people"."id" = 254 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:16.121784' WHERE "groups"."id" = 202  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0055/edit" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0055"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 253]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0055' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (254) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (201, 202) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (201, 202) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 254]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.2ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/44?referer=%2Fpeople%2Fsurname-0055%2Fedit" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0055/edit", "id"=>"44"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 253]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 44]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 44]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 254]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:16.177523' WHERE "people"."id" = 254 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 202]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:16.179350' WHERE "groups"."id" = 202  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0055/edit Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/people/surname-0055/edit" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0055"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 253]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0055' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (254) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.5ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 254]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 254]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:16.239783"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:16.239783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 203]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "203"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:16.244296"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:16.244296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:16.673488"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:16.673488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 255]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (255) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 36.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"204", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:16.959819"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 09:40:16.959819"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:16.960922"], ["group_id", 204], ["leader", "t"], ["person_id", 256], ["role", "Head Honcho"], ["updated_at", "2014-10-13 09:40:16.960922"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 256]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:16.963036' WHERE "people"."id" = 256 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 204]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:16.964543' WHERE "groups"."id" = 204  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/taylor Completed 302 Found in 14ms (ActiveRecord: 2.3ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 10:40:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 255]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (256) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (203, 204) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (203, 204) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 256]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:17.052999"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:40:17.052999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:17.055644"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:40:17.055644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:17.062563"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:17.062563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 205]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "205"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:17.067299"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:17.067299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:17.069237"], ["group_id", 206], ["person_id", 258], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:17.069237"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 258]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:17.070735' WHERE "people"."id" = 258 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:17.071389' WHERE "groups"."id" = 206  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 257]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 258]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (257) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (257) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (257) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:18.101769"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:40:18.101769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:18.104510"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:40:18.104510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:18.110971"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:18.110971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 207]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 207]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 207]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "207"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:18.115890"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:18.115890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:18.118103"], ["group_id", 208], ["person_id", 260], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:18.118103"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 260]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:18.119551' WHERE "people"."id" = 260 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:18.120253' WHERE "groups"."id" = 208  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 259]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 260]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:19.143926"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:40:19.143926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:19.146608"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:40:19.146608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:19.153109"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:19.153109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 209]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 209]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 209]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "209"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:19.157770"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:19.157770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:19.159735"], ["group_id", 210], ["person_id", 262], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:19.159735"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 262]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:19.161187' WHERE "people"."id" = 262 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:19.161866' WHERE "groups"."id" = 210  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 261]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 262]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:20.183754"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:40:20.183754"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:20.186375"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:40:20.186375"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:20.192747"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:20.192747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 211]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 211]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 211]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "211"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:20.197815"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:20.197815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:20.199871"], ["group_id", 212], ["person_id", 264], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:20.199871"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 264]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:20.201313' WHERE "people"."id" = 264 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:20.202006' WHERE "groups"."id" = 212  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 263]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 264]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (264, 258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (264, 258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (264, 258, 260, 262) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:21.224239"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:40:21.224239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:21.227199"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:40:21.227199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:21.234054"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:21.234054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 213]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 213]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 213]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "213"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:21.238761"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:21.238761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:21.240797"], ["group_id", 214], ["person_id", 266], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:21.240797"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 266]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:21.242525' WHERE "people"."id" = 266 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:21.243216' WHERE "groups"."id" = 214  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 265]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 266]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (265, 257, 259, 261, 263) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (265, 257, 259, 261, 263) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (265, 257, 259, 261, 263) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.318342"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 09:40:22.318342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.321184"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:22.321184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 267]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.328383"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 09:40:22.328383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.330715"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 09:40:22.330715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"270"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 269]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '270' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 270]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.338241"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 09:40:22.338241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.342786"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:22.342786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"272"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 271]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '272' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 272]] Redirected to http://test.host/people/doe?cache_bust=1413193222 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.351524"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 09:40:22.351524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.356355"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:22.356355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"274"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 273]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '274' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 274]] Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:22.372761"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:22.372761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 275]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 275]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 275]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (275) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 275]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (275) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.2ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 275]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (275) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 275]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 275]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.497339"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 09:40:22.497339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.503589"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:22.503589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 276]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.520025"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:22.520025"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.522320"], ["event", "create"], ["item_id", 216], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.134@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 216]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 216]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 216]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "216"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:22.527400"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:22.527400"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.529788"], ["event", "create"], ["item_id", 217], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.133@digital.justice.gov.uk\nancestry:\n- \n- '216'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:22.532788"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:40:22.532788"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:22.534486"], ["event", "create"], ["item_id", 277], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:22.980230"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:22.980230"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:22.982709"], ["event", "create"], ["item_id", 278], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 278]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 12ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (278) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (277) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"217", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (277) ORDER BY groups.name Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 277) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 277 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:23.271348"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:23.276418"], ["event", "update"], ["item_id", 277], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 277\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:40:22.532788000 Z\nupdated_at: 2014-10-13 09:40:22.532788000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:23.278217"], ["group_id", 217], ["person_id", 277], ["role", "Jefe"], ["updated_at", "2014-10-13 09:40:23.278217"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.280456"], ["event", "create"], ["item_id", 51], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 217\nperson_id:\n- \n- 277\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 277]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:23.282379' WHERE "people"."id" = 277 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 217]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:23.284011' WHERE "groups"."id" = 217  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/people/bob Completed 302 Found in 25ms (ActiveRecord: 4.3ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (277) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (216, 217) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (216, 217) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 1.9ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 51]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 277]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 217]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.2ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 277]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 277]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 217]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 216]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 27.0ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.477464"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:23.477464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 279]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (279) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (14.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.6ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.2ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:23.582765"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:23.582765"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.585113"], ["event", "create"], ["item_id", 280], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (280) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 280]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/35" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"35"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 35]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 280]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 280]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 280]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.630261"], ["event", "destroy"], ["item_id", 280], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 280\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 09:40:23.582765000 Z\nupdated_at: 2014-10-13 09:40:23.582765000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 280], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 279]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 280]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 280]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.655707"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:23.655707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 281]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (281) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:23.706216"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:23.706216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "218"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:23.711260"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:23.711260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (219) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (218, 219) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (218) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '218/219' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 20.4ms | ActiveRecord: 2.2ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"218", "team_email_address"=>"example.user.135@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (219) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 218]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 219) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 219) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 219 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 09:40:23.757944"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:23.762789"], ["event", "update"], ["item_id", 219], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 219\nname: original name\ncreated_at: 2014-10-13 09:40:23.711260000 Z\nupdated_at: 2014-10-13 09:40:23.711260000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '218'\nancestry_depth: 1\nteam_email_address: example.user.135@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 18ms (ActiveRecord: 2.9ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (219) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (218, 219) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 219]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '218/219' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '218/219' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 219]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 281]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.5ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 219]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.817364"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:23.817364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 282]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (282) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (14.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (14.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (15.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 49.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:23.887630"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:23.887630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "220"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:23.893580"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:23.893580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (221) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (220, 221) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (220) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '220/221' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.5ms | ActiveRecord: 2.3ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (221) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 220]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '220/221/%' OR "groups"."ancestry" = '220/221')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '220/221' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 221]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.937157"], ["event", "destroy"], ["item_id", 221], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 221\nname: original name\ncreated_at: 2014-10-13 09:40:23.893580000 Z\nupdated_at: 2014-10-13 09:40:23.893580000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '220'\nancestry_depth: 1\nteam_email_address: example.user.137@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 221], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (220) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (220) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 220]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '220' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '220' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 220]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 282]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 221]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:23.985283"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:23.985283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 283]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (283) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.032987"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 09:40:24.032987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (284) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.4ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (284) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 284]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.086328"], ["event", "destroy"], ["item_id", 284], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 284\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:40:24.032987000 Z\nupdated_at: 2014-10-13 09:40:24.032987000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 284], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 13ms (Views: 11.0ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/39" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"39"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 39]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 284]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 284) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.032987"], ["given_name", "Greg"], ["id", 284], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 09:40:24.136681"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.138949"], ["event", "create"], ["item_id", 284], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 283]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.163769"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:24.163769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 285]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (285) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (10.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (10.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (11.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.223569"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.223569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 222]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 222]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 222]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "222"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:24.228338"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.228338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.231010"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:40:24.231010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.232920"], ["group_id", 223], ["leader", "t"], ["person_id", 286], ["role", "Jefe"], ["updated_at", "2014-10-13 09:40:24.232920"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 286]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.234346' WHERE "people"."id" = 286 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.235014' WHERE "groups"."id" = 223  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (286) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (222, 223) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (222, 223) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 286]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.4ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/52?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"52"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 52]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 52]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.288719"], ["event", "destroy"], ["item_id", 52], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 52\ngroup_id: 223\nperson_id: 286\nrole: Jefe\ncreated_at: 2014-10-13 09:40:24.232920000 Z\nupdated_at: 2014-10-13 09:40:24.232920000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 52], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 286]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.292623' WHERE "people"."id" = 286 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 223]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.295320' WHERE "groups"."id" = 223  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 12ms (ActiveRecord: 2.4ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (286) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 285]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 52]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 286]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 223]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.360263"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:24.360263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 287]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (287) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.405968"], ["slug", "surname-0061"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 09:40:24.405968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0061/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0061' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (288) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0061" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0061", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0061"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0061' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (288) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0061' AND "people"."given_name" = '' AND ("people"."id" != 288) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 288]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 288 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:24.464779"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:24.473189"], ["event", "update"], ["item_id", 288], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 288\ngiven_name: \nsurname: Surname-0061\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 09:40:24.405968000 Z\nupdated_at: 2014-10-13 09:40:24.405968000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 288\n given_name: ''\n surname: Surname-0061\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 09:40:24.464779000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0061\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 288\n given_name: ''\n surname: Surname-0061\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 09:40:24.405968000 Z\n updated_at: &2 2014-10-13 09:40:24.464779000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0061\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 288\n given_name: ''\n surname: Surname-0061\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0061\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70255561484040\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 288\n given_name: ''\n surname: Surname-0061\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0061\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413193224-59379-0605\n cache_id: 1413193224-59379-0605\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413193224-59379-0605/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70255561594980\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 288\n given_name: ''\n surname: Surname-0061\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0061\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413193224-59379-0605\n cache_id: 1413193224-59379-0605\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413193224-59379-0605/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413193224-59379-0605\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413193224-59379-0605/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0061/image/edit Completed 302 Found in 24ms (ActiveRecord: 2.7ms) Started GET "/people/surname-0061/image/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0061' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (13.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 22ms (Views: 19.7ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 287]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 288]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 13.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.535539"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:24.535539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 289]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (289) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:24.607796"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 09:40:24.607796"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.610173"], ["event", "create"], ["item_id", 224], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (224) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (224) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 224]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '224' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '224' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 224]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 289]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 224]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:24.655205"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:24.655205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 290]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (290) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 38.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.707832"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 09:40:24.707832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (291) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.2ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (291) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 291) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 291 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 09:40:24.772157"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:24.776216"], ["event", "update"], ["item_id", 291], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 291\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:40:24.707832000 Z\nupdated_at: 2014-10-13 09:40:24.707832000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 16ms (ActiveRecord: 2.1ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (291) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 291]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.8ms) Started POST "/audit_trail/undo/44" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"44"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 44]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 291]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 291) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 291 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 09:40:24.829500"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:24.832757"], ["event", "update"], ["item_id", 291], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 291\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 09:40:24.707832000 Z\nupdated_at: 2014-10-13 09:40:24.772157000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 19ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:40:24 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 290]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 291]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 291]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.5ms | ActiveRecord: 0.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 291]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.852999"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 09:40:24.852999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.856026"], ["slug", "surname-0063"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 09:40:24.856026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.863213"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.863213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 225]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "225"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:24.868933"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.868933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.870394"], ["group_id", 226], ["person_id", 293], ["updated_at", "2014-10-13 09:40:24.870394"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.871100' WHERE "people"."id" = 293 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.871762' WHERE "groups"."id" = 226  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"53"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 292]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 53]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 53]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 293]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.876646' WHERE "people"."id" = 293 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 226]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.878178' WHERE "groups"."id" = 226  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 53]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.883461"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 09:40:24.883461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.886784"], ["slug", "surname-0065"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 09:40:24.886784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.893880"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.893880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 227]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 227]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 227]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "227"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:24.898643"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.898643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:24.900138"], ["group_id", 228], ["person_id", 295], ["updated_at", "2014-10-13 09:40:24.900138"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.900858' WHERE "people"."id" = 295 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.901557' WHERE "groups"."id" = 228  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"54"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 294]] Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 54]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 54]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 295]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:24.906490' WHERE "people"."id" = 295 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 228]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:24.908024' WHERE "groups"."id" = 228  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.925370"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.925370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:24.941632"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:24.941632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:24.952376"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:24.952376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:24.965643"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:24.965643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:24.977238"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:24.977238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:24.988741"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:24.988741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:40:25.001179"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:25.001179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.009323"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 09:40:25.009323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.017458"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.017458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 231]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 231]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 231]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "231"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.023506"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.023506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0050"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 301]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0050' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (232) ORDER BY people.surname Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.035770"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 09:40:25.035770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.045715"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.045715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 233]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 233]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 233]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "233"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.053135"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.053135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 302]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0051' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (234) ORDER BY people.surname Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.066101"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 09:40:25.066101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.075089"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.075089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 235]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 235]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 235]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "235"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.079868"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.079868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0052"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 303]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0052' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (236) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 235]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 235]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '235/236/%' OR "groups"."ancestry" = '235/236')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '235/236' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 236]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 11ms (ActiveRecord: 2.7ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.097944"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 09:40:25.097944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.101344"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.101344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 237]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 237]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 237]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "237"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.106899"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.106899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 304]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0054' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (238) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 237]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 237]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '237/238/%' OR "groups"."ancestry" = '237/238')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '237/238' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 238]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0053 Completed 302 Found in 8ms (ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.120926"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 09:40:25.120926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 305]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.128290"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 09:40:25.128290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 306]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.135324"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 09:40:25.135324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0055", "team_email_address"=>"example.user.157@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 307]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.141614"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.141614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0055 Completed 302 Found in 5ms (ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.147330"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 09:40:25.147330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0056", "team_email_address"=>"example.user.158@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 308]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.154130"], ["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.154130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0056 Completed 302 Found in 5ms (ActiveRecord: 1.1ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.159737"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 09:40:25.159737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0057", "team_email_address"=>"example.user.159@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 309]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.165842"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.165842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0057 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.171936"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 09:40:25.171936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 310]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.183309"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 09:40:25.183309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 311]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.194140"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 09:40:25.194140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 312]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.205173"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 09:40:25.205173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.212078"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.212078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 242]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 242]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 242]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "242"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.219090"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.219090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 313]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 3ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.227957"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 09:40:25.227957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 314]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.235724"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 09:40:25.235724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.242351"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.242351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 315]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.251303"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 09:40:25.251303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.260241"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.260241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 245]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 245]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 245]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "245"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.265895"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.265895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0059", "team_email_address"=>"example.user.163@digital.justice.gov.uk"}, "id"=>"group-0059"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 316]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0059' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (246) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0059' AND "groups"."id" != 246) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0059 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.279159"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 09:40:25.279159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.288023"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.288023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "247"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.293773"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.293773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0061", "team_email_address"=>"example.user.167@digital.justice.gov.uk"}, "id"=>"group-0060"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 317]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0060' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (248) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 247]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 248) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0061' AND "groups"."id" != 248) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 248 [["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.318700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0061 Completed 302 Found in 11ms (ActiveRecord: 2.7ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 248]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.324998"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 09:40:25.324998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.332935"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.332935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 249]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 249]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 249]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "249"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.337856"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.337856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0062", "team_email_address"=>"example.user.168@digital.justice.gov.uk"}, "id"=>"group-0062"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 318]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0062' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (250) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0062' AND "groups"."id" != 250) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0062 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.351712"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 09:40:25.351712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.360199"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.360199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "251"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.365347"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.365347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0063"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 319]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0063' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (252) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 251]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 252) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 252) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.382191"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 09:40:25.382191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.390134"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.390134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0064' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "253"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.395242"], ["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.395242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0064"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 320]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0064' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (254) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 253]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 254) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 254) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.411784"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 09:40:25.411784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.420174"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.420174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "255"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.424986"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.424986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0065"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 321]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (256) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 255]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 256) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 256) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:25.447284"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:25.447284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 322]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 322]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 322]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (322) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.1ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.497209"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.497209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "257"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.503179"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.503179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 258]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 258]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 258]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "257/258"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:25.508324"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.508324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 259]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 259]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 259]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "257/258/259"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:25.513468"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.513468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 257) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 257 [["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.516474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "257"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.521236"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.521236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 322]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (261) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (257, 261) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 261]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '257/261' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '257/261' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 261]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 322]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (261) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (257, 261) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (257) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.5ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '257/261' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.1ms | ActiveRecord: 2.6ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 322]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (261) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (257, 261) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 261 OR "groups"."ancestry" ILIKE '257/261/%') OR "groups"."ancestry" = '257/261')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (261) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 3.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:25.609300"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.609300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 262]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 262]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 262]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "262"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:25.614696"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.614696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 263]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "262/263"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:25.619683"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.619683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 264]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 264]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 264]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "262/263/264"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:25.625302"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:25.625302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:25 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:26.055126"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:26.055126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 323]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (323) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.4ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 323]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (265) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (262, 263, 264, 265) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 265]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '262/263/264/265' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '262/263/264/265' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 265]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:26.382254"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:26.382254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 266]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 266]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 266]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "266"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:26.387305"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:26.387305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 267]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 267]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 267]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "266/267"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:26.392032"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:26.392032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 268]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 268]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 268]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "266/267/268"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:26.396724"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:26.396724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:26.844246"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:26.844246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 324]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 324]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 324]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (324) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.1ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 324]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 324]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 324]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.105412"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.105412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 325]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 325]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 325]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (325) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.159936"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.159936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 270]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 270]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 270]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "270"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.165553"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.165553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 271]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 271]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 271]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "270/271"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.170914"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.170914"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 272]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 272]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 272]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "270/271/272"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:27.176349"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.176349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.179258"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:40:27.179258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.180964"], ["group_id", 271], ["person_id", 326], ["updated_at", "2014-10-13 09:40:27.180964"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.181646' WHERE "people"."id" = 326 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.182308' WHERE "groups"."id" = 271  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.184766"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:40:27.184766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.186328"], ["group_id", 271], ["person_id", 327], ["updated_at", "2014-10-13 09:40:27.186328"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.187059' WHERE "people"."id" = 327 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.187688' WHERE "groups"."id" = 271  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.190089"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:40:27.190089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.191638"], ["group_id", 271], ["person_id", 328], ["updated_at", "2014-10-13 09:40:27.191638"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.192358' WHERE "people"."id" = 328 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.192952' WHERE "groups"."id" = 271  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 325]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (271) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (270, 271) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 271]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '270/271' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '270/271' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '270/271' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.3ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.225705"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.225705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 329]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 329]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 20ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 329]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (329) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.290929"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.290929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 274]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 274]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 274]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "274"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.296447"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.296447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 275]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 275]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 275]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "274/275"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.302050"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.302050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 276]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 276]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 276]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "274/275/276"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:27.307636"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.307636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.310800"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:40:27.310800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.312547"], ["group_id", 275], ["person_id", 330], ["updated_at", "2014-10-13 09:40:27.312547"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.313226' WHERE "people"."id" = 330 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.313881' WHERE "groups"."id" = 275  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.316477"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:40:27.316477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.318219"], ["group_id", 275], ["person_id", 331], ["updated_at", "2014-10-13 09:40:27.318219"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.318914' WHERE "people"."id" = 331 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.319517' WHERE "groups"."id" = 275  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.322192"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:40:27.322192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.323730"], ["group_id", 275], ["person_id", 332], ["updated_at", "2014-10-13 09:40:27.323730"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.324376' WHERE "people"."id" = 332 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.324972' WHERE "groups"."id" = 275  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 329]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (275) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (274, 275) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 275]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '274/275' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '274/275' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '274/275' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 1.9ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 329]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (275) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (274, 275) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 275 OR "groups"."ancestry" ILIKE '274/275/%') OR "groups"."ancestry" = '274/275')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.8ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (277,276,275) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.383667"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.383667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 333]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 333]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 333]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (333) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.0ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.435347"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.435347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 278]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 278]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 278]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "278"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.440533"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.440533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 279]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 279]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 279]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "278/279"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.445734"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.445734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 280]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 280]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 280]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "278/279/280"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:27.451925"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.451925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.454953"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:40:27.454953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.456478"], ["group_id", 281], ["person_id", 334], ["updated_at", "2014-10-13 09:40:27.456478"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.457093' WHERE "people"."id" = 334 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.457693' WHERE "groups"."id" = 281  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.460475"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:40:27.460475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.463200"], ["group_id", 281], ["person_id", 335], ["updated_at", "2014-10-13 09:40:27.463200"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.464011' WHERE "people"."id" = 335 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.464789' WHERE "groups"."id" = 281  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.467745"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:40:27.467745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:27.469504"], ["group_id", 281], ["person_id", 336], ["updated_at", "2014-10-13 09:40:27.469504"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:27.470190' WHERE "people"."id" = 336 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:27.470814' WHERE "groups"."id" = 281  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 333]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (281) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (278, 279, 280, 281) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 281]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '278/279/280/281' ORDER BY "groups"."name" ASC CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '278/279/280/281' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 281]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.3ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.514619"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.514619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 337]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 337]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 337]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (337) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (41.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 50.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.583946"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.583946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 282]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 282]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "282"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.589591"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.589591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 283]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 283]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 283]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "282/283"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.595505"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.595505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 284]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 284]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 284]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "282/283/284"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:27.601163"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.601163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 337]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (282) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (282) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 282]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282' ORDER BY "groups"."name" ASC CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 337]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (283) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (282, 283) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 283]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.0ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 337]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (284) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (282, 283, 284) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283/284' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283/284' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '282/283/284' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.678438"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.678438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 338]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 338]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 338]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (338) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.729636"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.729636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 286]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 286]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 286]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "286"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.734758"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.734758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 287]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 287]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 287]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "286/287"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.742366"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.742366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 288]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 288]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 288]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "286/287/288"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:27.748881"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.748881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 338]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (289) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (286, 287, 288, 289) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 289]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '286/287/288/289' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '286/287/288/289' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 289]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.777643"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 09:40:27.777643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 339]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.785356"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 09:40:27.785356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 340]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.792015"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 09:40:27.792015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.798834"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.798834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 341]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.806620"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 09:40:27.806620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.814111"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.814111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 342]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.825818"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.825818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.836768"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.836768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 343]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 343]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 343]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (343) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.5ms | ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 343]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 6.2ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:27.913158"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:27.913158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 344]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 344]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 344]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (344) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 39.0ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:27.980603"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.980603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "293"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:27.987431"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.987431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 294]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 294]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 294]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "293/294"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:27.994072"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:27.994072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 293]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "293"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:28.000459"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:28.000459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 296]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 296]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 296]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "293/296"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:28.006373"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:28.006373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.009374"], ["slug", "surname-0091"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 09:40:28.009374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.010923"], ["group_id", 295], ["person_id", 345], ["updated_at", "2014-10-13 09:40:28.010923"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:28.011598' WHERE "people"."id" = 345 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:28.012428' WHERE "groups"."id" = 295  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.013926"], ["group_id", 297], ["person_id", 345], ["updated_at", "2014-10-13 09:40:28.013926"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:28.014619' WHERE "people"."id" = 345 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:28.015231' WHERE "groups"."id" = 297  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 344]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (297) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (293, 296, 297) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 297]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '293/296/297' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '293/296/297' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 297]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 2.0ms) Started GET "/people/surname-0091" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0091"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 344]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0091' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (345) ORDER BY groups.name Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 297]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (293, 294, 295) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (293, 296, 297) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (293, 294, 295) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (293, 296, 297) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 15.3ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.077472"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.077472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 346]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 346]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 346]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (346) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.131423"], ["slug", "surname-0092"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 09:40:28.131423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0092" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0092"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 346]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (347) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.159526"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.159526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 348]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 348]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 348]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (348) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0093' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.204911"], ["slug", "surname-0093"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 09:40:28.204911"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0093" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0093"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 348]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0093' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (349) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.231588"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.231588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 350]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (350) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (16.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.290345"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:28.290345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (351) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (351) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (351) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 351) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 351 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:40:28.365348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 2.0ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 350]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (351) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.397421"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.397421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 352]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (352) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.442828"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:28.442828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (353) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.0ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (353) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.6ms | ActiveRecord: 1.3ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (353) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 353) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 353 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:40:28.523593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.533927"], ["updated_at", "2014-10-13 09:40:28.533927"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "62b37898-9b5a-448c-a6d9-9e4f36a979c9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 16.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 10:40:28 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0c85990_e7f33fe5a4c65bf0589fd@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/62b37898-9b5a-448c-a6d9-9e4f36a979c9?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 53ms (ActiveRecord: 2.5ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (353) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.598050"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.598050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 354]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 354]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 354]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (354) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 52ms (Views: 44.5ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 354]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 43.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 354]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:28.730180"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-260a43b2-0938-402b-96f7-6565c92d1218"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:28.730180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-260a43b2-0938-402b-96f7-6565c92d1218 Completed 302 Found in 13ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-260a43b2-0938-402b-96f7-6565c92d1218" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-260a43b2-0938-402b-96f7-6565c92d1218"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 354]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-260a43b2-0938-402b-96f7-6565c92d1218' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (355) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.767466"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.767466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 356]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (356) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.3ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:28.816502"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 09:40:28.816502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0094/edit" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (357) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.9ms | ActiveRecord: 1.1ms) Started DELETE "/people/surname-0094" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0094"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (357) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 357]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 356]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:28.913925"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:28.913925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 358]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 358]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 18ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 358]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (358) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.3ms | ActiveRecord: 1.5ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:28 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 358]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.0ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 358]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:29.016493"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-267eb5b5-2a4c-4ef0-a072-744401ccf0bb"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:29.016493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-267eb5b5-2a4c-4ef0-a072-744401ccf0bb Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-267eb5b5-2a4c-4ef0-a072-744401ccf0bb" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-267eb5b5-2a4c-4ef0-a072-744401ccf0bb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 358]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-267eb5b5-2a4c-4ef0-a072-744401ccf0bb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (359) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.044803"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.044803"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 360]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (360) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 45ms (Views: 39.9ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.100003"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:29.100003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (361) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (361) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (361) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 361) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 361 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:29.180226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:29.190312"], ["updated_at", "2014-10-13 09:40:29.190312"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "2e9b5dbd-f1cc-40b1-b7a1-ec48f129d34a"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 13.3ms Sent mail to bob.smith@digital.justice.gov.uk (20.5ms) Date: Mon, 13 Oct 2014 10:40:29 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0d31380_e7f33fe5a4c65bf059063@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/2e9b5dbd-f1cc-40b1-b7a1-ec48f129d34a?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 52ms (ActiveRecord: 2.2ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 360]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (361) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.250268"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.250268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 362]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (362) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.300140"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:29.300140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (363) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1/edit" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (363) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (363) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 363) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 363 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:40:29.380280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1 Completed 302 Found in 13ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 362]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f7d240c8-09ce-4cbe-bf19-cb3326e440f1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (363) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.409133"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.409133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 364]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 364]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 364]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (364) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:29.458074"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:40:29.458074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:29.461908"], ["updated_at", "2014-10-13 09:40:29.461908"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "4cf05dad-5b99-4f11-9960-0fecdfb566b9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/4cf05dad-5b99-4f11-9960-0fecdfb566b9?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"4cf05dad-5b99-4f11-9960-0fecdfb566b9"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '4cf05dad-5b99-4f11-9960-0fecdfb566b9' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 365]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (365) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.0ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.496935"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.496935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 366]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (366) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.9ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.551354"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:29.551354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (367) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (367) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.8ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (367) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 367) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 367 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:29.629766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:29.635805"], ["updated_at", "2014-10-13 09:40:29.635805"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "cff69ef4-19c0-4e82-8296-94e963202f36"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 12.7ms Sent mail to bob.smithe@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:40:29 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543b9e0d9dcf9_e7f33fe5a4c65bf05914d@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/cff69ef4-19c0-4e82-8296-94e963202f36?desired_path=%2Fpeople%2Fbob-smith.  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:29.655736"], ["updated_at", "2014-10-13 09:40:29.655736"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "6bf9e239-b11f-4e09-99d0-290302d6cd69"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 9.2ms Sent mail to bob.smith@digital.justice.gov.uk (5.8ms) Date: Mon, 13 Oct 2014 10:40:29 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0da1b80_e7f33fe5a4c65bf05922d@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/6bf9e239-b11f-4e09-99d0-290302d6cd69?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 48ms (ActiveRecord: 2.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 366]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (367) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.695767"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.695767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 368]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 368]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (368) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 368]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 368]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:29.806119"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:29.806119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 368]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (369) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.835417"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.835417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 370]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (370) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:29.884884"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-bb38d784-5b0a-4506-a583-da57851583da"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 09:40:29.884884"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-bb38d784-5b0a-4506-a583-da57851583da/edit" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-bb38d784-5b0a-4506-a583-da57851583da"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bb38d784-5b0a-4506-a583-da57851583da' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (371) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-bb38d784-5b0a-4506-a583-da57851583da" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-bb38d784-5b0a-4506-a583-da57851583da"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bb38d784-5b0a-4506-a583-da57851583da' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (371) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 371]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.7ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 370]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:29.972336"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:29.972336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 372]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (372) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.018096"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:30.018096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (373) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (373) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (373) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 373) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 373 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:30.103622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 372]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (373) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.9ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.132605"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.132605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 374]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (374) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:30.177814"], ["email", "test.user"], ["slug", "test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 09:40:30.177814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (375) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a6c782d1-a8ee-457d-8421-f764ffe4c1eb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (375) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 375]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 374]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.256771"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.256771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 376]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 376]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 376]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (376) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 376]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 34.3ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 376]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:30.370576"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-47ef4d3e-9408-4d02-a6c7-8b8c9225f5b2"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:30.370576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-47ef4d3e-9408-4d02-a6c7-8b8c9225f5b2 Completed 302 Found in 11ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-47ef4d3e-9408-4d02-a6c7-8b8c9225f5b2" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-47ef4d3e-9408-4d02-a6c7-8b8c9225f5b2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 376]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-47ef4d3e-9408-4d02-a6c7-8b8c9225f5b2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (377) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.401496"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.401496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 378]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (378) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.3ms | ActiveRecord: 1.3ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:30.450279"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 09:40:30.450279"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (379) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (379) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 9.7ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 10:40:30 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0e7d8ed_e7f33fe5a4c65bf05932b@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 379]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 25ms (ActiveRecord: 1.8ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 378]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.3ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.549741"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.549741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 380]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (380) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:30.601515"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:30.601515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (381) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (381) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (15.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 46.4ms | ActiveRecord: 1.3ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (381) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 381) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 381 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:40:30.693659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 380]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (381) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 15ms (Views: 10.5ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.724284"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.724284"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 382]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (382) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.777098"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:30.777098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (383) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (383) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (383) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 383) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 383 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:40:30.858261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:30.864592"], ["updated_at", "2014-10-13 09:40:30.864592"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "f2f36dc8-b223-4d97-b36d-e3fd20cc040b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 9.4ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 10:40:30 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0ed4cb4_e7f33fe5a4c65bf0594cd@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/f2f36dc8-b223-4d97-b36d-e3fd20cc040b?desired_path=%2Fpeople%2Ftest-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7. Redirected to http://www.example.com/people/test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7 Completed 302 Found in 31ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 382]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f3dc70bd-72b7-4db9-bfbe-bf24821b8eb7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (383) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.2ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:30.909354"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:30.909354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 384]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (384) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (13.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.6ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:30.966822"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 09:40:30.966822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63/edit" for 127.0.0.1 at 2014-10-13 10:40:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (385) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e7c8a978-4e08-4f67-88b2-b8b4e2543c63' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (385) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 385]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 4ms (ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 384]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.6ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:31.052496"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:31.052496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 386]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (386) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:31.101208"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-65807ae0-03ae-413b-920e-4bbef3df64bd"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:31.101208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-65807ae0-03ae-413b-920e-4bbef3df64bd" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-65807ae0-03ae-413b-920e-4bbef3df64bd"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-65807ae0-03ae-413b-920e-4bbef3df64bd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (387) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-65807ae0-03ae-413b-920e-4bbef3df64bd/edit" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-65807ae0-03ae-413b-920e-4bbef3df64bd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-65807ae0-03ae-413b-920e-4bbef3df64bd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (387) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-65807ae0-03ae-413b-920e-4bbef3df64bd" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-65807ae0-03ae-413b-920e-4bbef3df64bd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-65807ae0-03ae-413b-920e-4bbef3df64bd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (387) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 387) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 387 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:40:31.180179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-65807ae0-03ae-413b-920e-4bbef3df64bd Completed 302 Found in 15ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-65807ae0-03ae-413b-920e-4bbef3df64bd" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-65807ae0-03ae-413b-920e-4bbef3df64bd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 386]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-65807ae0-03ae-413b-920e-4bbef3df64bd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (387) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:31.223125"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:31.223125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 388]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 388]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (388) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 388]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 34.7ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 388]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:40:31.332418"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:40:31.332418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.338108"], ["updated_at", "2014-10-13 09:40:31.338108"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "8dc97bdc-792e-43c8-8370-2a8085fd2d0c"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 12.1ms Sent mail to bob.smith@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 10:40:31 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543b9e0f5504c_e7f33fe5a4c65bf059572@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/8dc97bdc-792e-43c8-8370-2a8085fd2d0c?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 29ms (ActiveRecord: 1.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:40:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 388]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (389) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0099' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.385052"], ["slug", "surname-0099"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 09:40:31.385052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.391800"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.391800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "298"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.396545"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.396545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 298) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 298 [["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.399903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 298]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "298"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.404551"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.404551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.406662"], ["group_id", 300], ["person_id", 390], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:40:31.406662"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 390]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:31.408159' WHERE "people"."id" = 390 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:31.408812' WHERE "groups"."id" = 300  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.410107"], ["group_id", 299], ["person_id", 390], ["role", "Designer"], ["updated_at", "2014-10-13 09:40:31.410107"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 390]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:31.411728' WHERE "people"."id" = 390 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:31.412416' WHERE "groups"."id" = 299  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 390]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.419014"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 09:40:31.419014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 391]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.423671"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:40:31.423671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 392]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0101' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.427732"], ["slug", "surname-0101"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 09:40:31.427732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.434875"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.434875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 301]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 301]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 301]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "301"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.439477"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 09:40:31.439477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.441556"], ["group_id", 302], ["person_id", 393], ["updated_at", "2014-10-13 09:40:31.441556"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 393]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:31.442944' WHERE "people"."id" = 393 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:31.443672' WHERE "groups"."id" = 302  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 393]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0102' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.448392"], ["slug", "surname-0102"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 09:40:31.448392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 394]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.458598"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.458598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 303) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 303 [["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.461955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 303) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 303 [["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.464982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 303) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 303 [["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.467877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 303) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 303 [["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.473581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.481331"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.481331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 304) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 304 [["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.484468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 304) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 304 [["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.488459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 304) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 304 [["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.492694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.504739"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.504739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 305) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 305 [["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.508186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 305) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 305 [["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.511510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 305) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 305 [["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.514386"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.528431"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.528431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 306) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 306 [["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.532228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0105' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.540469"], ["slug", "surname-0105"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 09:40:31.540469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0106' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:31.555938"], ["slug", "surname-0106"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 09:40:31.555938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.564226"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.564226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 307]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 307]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 307]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "307"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.569538"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.569538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "307/308"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.575158"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.575158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "307/308/309"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.581217"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.581217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 309]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "307/308/309"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.587091"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.587091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "307/308"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.592987"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.592987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 308]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.603944"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.603944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 313]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 313]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 313]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "313"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.608659"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.608659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "313/314"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.613841"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.613841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "313/314/315"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.619356"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.619356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 315]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "313/314/315"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.625493"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.625493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 314]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "313/314"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.633460"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.633460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 314 OR "groups"."ancestry" ILIKE '313/314/%') OR "groups"."ancestry" = '313/314')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.642527"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.642527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 319]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 319]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 319]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "319"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:31.648276"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.648276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "319/320"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.653725"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.653725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "319/320/321"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.658867"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.658867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 321]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "319/320/321"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:40:31.666145"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.666145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 320]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "319/320"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:31.671560"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.671560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 320 OR "groups"."ancestry" ILIKE '319/320/%') OR "groups"."ancestry" = '319/320')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:31.684165"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:31.684165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:31.687203"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:40:31.687203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 397]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:32.707800"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:32.707800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 398]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 398]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 398]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (398) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 398]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.5ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 10:40:32 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 398]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (397) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 397]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 0.9ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.3ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.838495"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 09:40:32.838495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.841079"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 09:40:32.841079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"400"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 399]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '400' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 400]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.848538"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 09:40:32.848538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.851041"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 09:40:32.851041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"402"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 401]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '402' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 402]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.859181"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 09:40:32.859181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.863236"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 09:40:32.863236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"404"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 403]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '404' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 404]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.874140"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 09:40:32.874140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.876773"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 09:40:32.876773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.885911"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:32.885911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 326]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 326]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 326]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "326"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:32.891943"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:32.891943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:32.894339"], ["group_id", 327], ["person_id", 406], ["updated_at", "2014-10-13 09:40:32.894339"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 406]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:32.895951' WHERE "people"."id" = 406 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:32.896756' WHERE "groups"."id" = 327  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"406"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 405]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '406' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 406]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 406]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 405], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.272@digital.justice.gov.uk"], ["subject_id", 406]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.3ms Sent mail to example.user.272@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 10:40:32 +0100 From: support@example.com To: example.user.272@digital.justice.gov.uk Message-ID: <543b9e10de7a4_e7f33fe5a4c65bf059630@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0113 has said that they believe the information on Surname-0114 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 406]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.921789"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 09:40:32.921789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.924771"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 09:40:32.924771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.947579"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:32.947579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 328]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 328]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 328]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "328"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:32.952833"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:32.952833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:32.955048"], ["group_id", 329], ["person_id", 408], ["updated_at", "2014-10-13 09:40:32.955048"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 408]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:32.956655' WHERE "people"."id" = 408 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:32.957379' WHERE "groups"."id" = 329  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"408"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 407]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '408' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 408]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 408]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 407], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.274@digital.justice.gov.uk"], ["subject_id", 408]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.2ms Sent mail to example.user.274@digital.justice.gov.uk (5.7ms) Date: Mon, 13 Oct 2014 10:40:32 +0100 From: support@example.com To: example.user.274@digital.justice.gov.uk Message-ID: <543b9e10ed16a_e7f33fe5a4c65bf05971d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0115 has said that they believe the information on Surname-0116 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.982035"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 09:40:32.982035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.986784"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 09:40:32.986784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:32.997633"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:32.997633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 330]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 330]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 330]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "330"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.003296"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.003296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.005589"], ["group_id", 331], ["person_id", 410], ["updated_at", "2014-10-13 09:40:33.005589"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 410]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:33.007157' WHERE "people"."id" = 410 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:33.007858' WHERE "groups"."id" = 331  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"410"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 409]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '410' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 410]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 410]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 409], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.276@digital.justice.gov.uk"], ["subject_id", 410]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.4ms Sent mail to example.user.276@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:40:33 +0100 From: support@example.com To: example.user.276@digital.justice.gov.uk Message-ID: <543b9e115217_e7f33fe5a4c65bf0598f9@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0117 has said that they believe the information on Surname-0118 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.029721"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 09:40:33.029721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.032712"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 09:40:33.032712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.039797"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.039797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 332]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 332]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 332]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "332"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.044500"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.044500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.046541"], ["group_id", 333], ["person_id", 412], ["updated_at", "2014-10-13 09:40:33.046541"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 412]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:33.048035' WHERE "people"."id" = 412 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:33.048712' WHERE "groups"."id" = 333  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"412"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 411]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '412' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 412]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 412]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 411], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.278@digital.justice.gov.uk"], ["subject_id", 412]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.5ms Sent mail to example.user.278@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:40:33 +0100 From: support@example.com To: example.user.278@digital.justice.gov.uk Message-ID: <543b9e11f1db_e7f33fe5a4c65bf0599f2@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0119 has said that they believe the information on Surname-0120 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.070892"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 09:40:33.070892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.074397"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 09:40:33.074397"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.082785"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.082785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 334]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "334"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.088289"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.088289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.090868"], ["group_id", 335], ["person_id", 414], ["updated_at", "2014-10-13 09:40:33.090868"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 414]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:33.092713' WHERE "people"."id" = 414 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:33.093589' WHERE "groups"."id" = 335  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"414"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 413]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '414' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 414]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 414]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 413], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.280@digital.justice.gov.uk"], ["subject_id", 414]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.3ms Sent mail to example.user.280@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 10:40:33 +0100 From: support@example.com To: example.user.280@digital.justice.gov.uk Message-ID: <543b9e111a8a3_e7f33fe5a4c65bf0600de@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0121 has said that they believe the information on Surname-0122 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.118541"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 09:40:33.118541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.120997"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 09:40:33.120997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"416"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 415]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '416' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 416]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 416]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.134438"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 09:40:33.134438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 417]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.142180"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 09:40:33.142180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 418]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.151995"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.151995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 336]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 336]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 336]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "336"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.156783"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.156783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.161362"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 09:40:33.161362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.163842"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 09:40:33.163842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0128"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 419]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0128' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (420) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.173786"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 09:40:33.173786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0130' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.176277"], ["slug", "surname-0130"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 09:40:33.176277"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0130"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 421]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0130' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (422) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.189781"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.189781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 338]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 338]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 338]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "338"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.195242"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.195242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.200626"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 09:40:33.200626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 423]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.212746"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.212746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 340]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 340]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 340]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "340"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.218098"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.218098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.222943"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 09:40:33.222943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 424]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.230284"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 09:40:33.230284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 425]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.237516"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 09:40:33.237516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0135' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.240497"], ["slug", "surname-0135"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 09:40:33.240497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0135"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 426]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0135' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (427) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.249574"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 09:40:33.249574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0137' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.252852"], ["slug", "surname-0137"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 09:40:33.252852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0137"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 428]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0137' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (429) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.264290"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 09:40:33.264290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0139' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.267957"], ["slug", "surname-0139"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 09:40:33.267957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0139"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 430]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0139' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (431) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.281741"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.281741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 342]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 342]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 342]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "342"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.286920"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.286920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.303541"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 09:40:33.303541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0141' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.306467"], ["slug", "surname-0141"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 09:40:33.306467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0141"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 432]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0141' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (433) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.318538"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 09:40:33.318538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0143' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.322393"], ["slug", "surname-0143"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 09:40:33.322393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.329501"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.329501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 344]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 344]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 344]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "344"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.334734"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.334734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.336687"], ["group_id", 345], ["person_id", 435], ["updated_at", "2014-10-13 09:40:33.336687"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 435]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:33.338277' WHERE "people"."id" = 435 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:33.338952' WHERE "groups"."id" = 345  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0143"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0143' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (435) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.350210"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 09:40:33.350210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0145' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.353515"], ["slug", "surname-0145"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 09:40:33.353515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0145"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 436]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0145' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (437) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 437]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.364402"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 09:40:33.364402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0147' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.367950"], ["slug", "surname-0147"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 09:40:33.367950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0147"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 438]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0147' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (439) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 439]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.379944"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 09:40:33.379944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0149' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.383408"], ["slug", "surname-0149"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 09:40:33.383408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0149"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 440]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0149' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (441) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 441]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.394273"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 09:40:33.394273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.396809"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:40:33.396809"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 442]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.406151"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 09:40:33.406151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 444]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.414708"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 09:40:33.414708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 445]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.427684"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.427684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 346]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 346]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 346]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "346"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.432577"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.432577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.437245"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 09:40:33.437245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 446]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.445692"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 09:40:33.445692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 447]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.454384"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 09:40:33.454384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0156"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 448]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0156' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0156' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.461613"], ["slug", "surname-0156"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 09:40:33.461613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0156 Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.469752"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 09:40:33.469752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0158"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 450]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0158' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0158' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.478729"], ["slug", "surname-0158"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 09:40:33.478729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0158 Completed 302 Found in 7ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.484817"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 09:40:33.484817"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0160"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 452]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0160' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0160' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.491623"], ["slug", "surname-0160"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 09:40:33.491623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0160 Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.497245"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 09:40:33.497245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0162", "image"=>"#"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 454]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0162' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0162' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.503928"], ["image", nil], ["slug", "surname-0162"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 09:40:33.503928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0162/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.509961"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 09:40:33.509961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 456]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.515899"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 09:40:33.515899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.518676"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:40:33.518676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.521177"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:40:33.521177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 457]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (459) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 459) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.533775"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 09:40:33.533775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0166' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.537133"], ["slug", "surname-0166"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 09:40:33.537133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0166"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 460]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0166' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (461) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.547998"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 09:40:33.547998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0168' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.551290"], ["slug", "surname-0168"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 09:40:33.551290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 462]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (463) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.567178"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.567178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 348]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 348]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 348]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "348"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:33.573966"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.573966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.579013"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 09:40:33.579013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0170' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.582302"], ["slug", "surname-0170"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 09:40:33.582302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0170"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 464]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0170' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (465) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.593693"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 09:40:33.593693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0172' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.597024"], ["slug", "surname-0172"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 09:40:33.597024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 466]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (467) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.610623"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 09:40:33.610623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0174' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.614082"], ["slug", "surname-0174"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 09:40:33.614082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0175", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0174"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 468]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0174' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (469) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0175' AND "people"."given_name" IS NULL AND ("people"."id" != 469) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 469 [["surname", "Surname-0175"], ["updated_at", "2014-10-13 09:40:33.623341"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0174 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.629104"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 09:40:33.629104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0177' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.632391"], ["slug", "surname-0177"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 09:40:33.632391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0178", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0177"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 470]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0177' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (471) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0178' AND "people"."given_name" IS NULL AND ("people"."id" != 471) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 471 [["surname", "Surname-0178"], ["updated_at", "2014-10-13 09:40:33.641711"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0177 Completed 302 Found in 21ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 471]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.661339"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 09:40:33.661339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0180' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.664817"], ["slug", "surname-0180"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 09:40:33.664817"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0181", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0180"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 472]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (473) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0181' AND "people"."given_name" IS NULL AND ("people"."id" != 473) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 473 [["surname", "Surname-0181"], ["updated_at", "2014-10-13 09:40:33.674931"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0180 Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.680633"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 09:40:33.680633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0183' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:33.683920"], ["slug", "surname-0183"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 09:40:33.683920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0184", "image"=>"#"}, "id"=>"surname-0183"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 474]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0183' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (475) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0184' AND "people"."given_name" IS NULL AND ("people"."id" != 475) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 475]] SQL (0.6ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 475 [["image", nil], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 09:40:33.692719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0183/image/edit Completed 302 Found in 10ms (ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:33.709795"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:33.709795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:33 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:33 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:34.134319"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:34.134319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 476]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (476) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (350) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (350) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 350]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '350' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '350' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 350]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.9ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"350", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 350]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 350]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 350]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 350]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "350"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:34.407586"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:40:34.407586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/teams/csg Completed 302 Found in 9ms (ActiveRecord: 1.9ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 476]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (351) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (350, 351) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 351]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '350/351' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '350/351' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 351]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 350]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:34.503833"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:34.503833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 477]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 477]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 477]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (477) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:34.559327"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:34.559327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "352"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:34.564314"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:34.564314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0094/edit" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 477]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0094' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (353) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (352, 353) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 352]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (352) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '352/353' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 17.9ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:34.614767"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:34.614767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 354]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 354]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 354]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "354"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:34.619554"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:34.619554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:34 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:35.045250"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:35.045250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 478]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (478) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 42.7ms | ActiveRecord: 1.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"355", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 355]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 355]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 355]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 355]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "354/355"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:35.298713"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:40:35.298713"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (356) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (354, 355, 356) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 356]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '354/355/356' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '354/355/356' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 356]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:35.397865"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:35.397865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 357]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 357]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 357]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "357"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:35.403428"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:35.403428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "357/358"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:35.409261"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:35.409261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:35.858893"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:35.858893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 479]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (479) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 42ms (Views: 35.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:35 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (359) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (357, 358, 359) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 359]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '357/358/359' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '357/358/359' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 359]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (359) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (357, 358, 359) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (357, 358) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '357/358/359' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.3ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"358", "team_email_address"=>"example.user.303@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (359) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 359) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 359) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 359 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 09:40:36.208218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/teams/cyberdigital-cyberservices Completed 302 Found in 14ms (ActiveRecord: 3.0ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (359) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (357, 358, 359) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 359]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '357/358/359' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '357/358/359' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 359]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 359]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 358]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.302691"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.302691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 480]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 480]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (480) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:36.355697"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.355697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "360"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:36.360879"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.360879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0095/edit" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0095"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0095' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (361) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (360, 361) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (360) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.8ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '360/361' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 20.1ms | ActiveRecord: 2.4ms) Started DELETE "/teams/group-0095" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0095"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0095' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (361) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 360]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '360/361/%' OR "groups"."ancestry" = '360/361')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '360/361' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 361]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 11ms (ActiveRecord: 2.6ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (360) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (360) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 360]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '360' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '360' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 360]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 361]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.443663"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.443663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 481]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 481]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 481]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (481) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (14.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 44.8ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 481]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 0.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.533519"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.533519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 482]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 482]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 482]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (482) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 42ms (Views: 37.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:36.588208"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.588208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 362]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 362]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 362]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "362"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:36.592717"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.592717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 362]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 482]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (362) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (362) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '362' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '362' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.3ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.630406"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.630406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 483]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (483) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:36.682655"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.682655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 364]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 364]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 364]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "364"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:36.687762"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.687762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (365) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (364, 365) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 365]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '364/365' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '364/365' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 365]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.0ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.8ms | ActiveRecord: 0.5ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"365", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 365]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 365]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 365]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 365]]  (0.6ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "364/365"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:36.739769"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:40:36.739769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 11ms (ActiveRecord: 2.4ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (366) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (364, 365, 366) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 366]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '364/365/366' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '364/365/366' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 366]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.5ms | ActiveRecord: 2.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 365]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.785544"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.785544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 484]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 484]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 484]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (484) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0185' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:36.831867"], ["slug", "surname-0185"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 09:40:36.831867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:36.838895"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.838895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "367"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:36.844152"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:36.844152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:40:36.845601"], ["group_id", 368], ["person_id", 485], ["updated_at", "2014-10-13 09:40:36.845601"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:40:36.846316' WHERE "people"."id" = 485 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:40:36.846969' WHERE "groups"."id" = 368  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0097/edit" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0097"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 484]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0097' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (368) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (367, 368) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 367]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (367) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '367/368' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.8ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:36.890931"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:36.890931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 486]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (486) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.7ms | ActiveRecord: 1.2ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.3ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:36.968671"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:40:36.968671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (369) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 369]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '369' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '369' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 369]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 2.3ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 10:40:36 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 486]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (369) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '369' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (17.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '369' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 25.4ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:40:37.041772"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:37.041772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "370"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:40:37.046988"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:37.046988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "370/371"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:40:37.052042"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:40:37.052042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:62902/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:37.480282"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:37.480282"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 487]] Redirected to http://127.0.0.1:62902/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (487) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (372) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (370, 371, 372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 372]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '370/371/372' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '370/371/372' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 372]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.1ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (372) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (370, 371, 372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 371]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (370, 371) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '370/371/372' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 18.5ms | ActiveRecord: 2.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"370", "team_email_address"=>"example.user.314@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (372) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 372) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 372) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '370/371/372/%' OR "groups"."ancestry" = '370/371/372')) SQL (0.3ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 372 [["ancestry", "370"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 09:40:37.827372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:62902/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (372) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (370, 372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 372]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '370/372' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '370/372' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 372]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 372]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 370]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:40:37.918702"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:40:37.918702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 488]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 488]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 488]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (488) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 43.4ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 488]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.7ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:40:37 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 488]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:40:38.000016"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:40:38.000016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:40:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 488]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (373) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (373) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 373]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '373' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '373' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 373]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0001' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:48.429559"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0001"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 09:56:48.429559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:56:48.436850"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 09:56:48.436850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:49.512927"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:49.512927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 374]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 374]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 374]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "374"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:49.519107"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:49.519107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (32.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (76.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Completed 200 OK in 155ms (Views: 152.9ms | ActiveRecord: 1.7ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 10:56:49 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:50.709378"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:50.709378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 491]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 22ms (ActiveRecord: 2.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (491) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 71ms (Views: 54.5ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (51.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 63ms (Views: 58.6ms | ActiveRecord: 0.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (8.5ms) Completed 200 OK in 19ms (Views: 17.1ms | ActiveRecord: 0.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:51.145671"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.145671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 376]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 376]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 376]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "376"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:51.151356"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.151356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:51.154430"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 09:56:51.154430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:51.156663"], ["group_id", 377], ["person_id", 492], ["updated_at", "2014-10-13 09:56:51.156663"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 492]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:51.158954' WHERE "people"."id" = 492 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:51.159745' WHERE "groups"."id" = 377  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:51.590894"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:51.590894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 493]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (493) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.6ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0003/edit" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0003"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (492) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (376, 377) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (376, 377) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 492]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.9ms | ActiveRecord: 2.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0003" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0003", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"377", "leader"=>"0", "id"=>"76"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0003"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (492) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 492]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 492 AND "memberships"."id" != 76 AND "memberships"."group_id" = 377) LIMIT 1 Peoplefinder::Membership Exists (0.5ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 377 AND "memberships"."id" != 76 AND "memberships"."person_id" = 492) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0003' AND "people"."given_name" = '' AND ("people"."id" != 492) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 492 AND "memberships"."id" != 76 AND "memberships"."group_id" = 377) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 377 AND "memberships"."id" != 76 AND "memberships"."person_id" = 492) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 492 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:51.868661"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 76 [["role", "Head Honcho"], ["updated_at", "2014-10-13 09:56:51.870791"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:51.871652' WHERE "people"."id" = 492 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:51.872327' WHERE "groups"."id" = 377  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/surname-0003 Completed 302 Found in 20ms (ActiveRecord: 3.8ms) Started GET "/people/surname-0003" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0003"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 493]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (492) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (376, 377) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (376, 377) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 17.6ms | ActiveRecord: 1.5ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 10:56:51 +0100 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 492]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:51.975583"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.975583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "378"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:51.981430"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.981430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:51.983988"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 09:56:51.983988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:51.985855"], ["group_id", 379], ["person_id", 494], ["updated_at", "2014-10-13 09:56:51.985855"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 494]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:51.987216' WHERE "people"."id" = 494 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:51.987864' WHERE "groups"."id" = 379  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 378) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 378 [["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.990808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 378]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "378"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:51.995329"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:51.995329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:52.426984"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:52.426984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 495]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (495) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.9ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0004/edit" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0004"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0004' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (494) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 379) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 379) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 494]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 41.7ms | ActiveRecord: 1.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/add_membership?id=surname-0004" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0004"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0004' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (494) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Completed 200 OK in 12ms (Views: 6.3ms | ActiveRecord: 1.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:52 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0004" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0004", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"379", "leader"=>"0", "id"=>"77"}, "70213900272920"=>{"role"=>"Talker", "group_id"=>"380", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0004"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0004' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (494) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 494]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 494 AND "memberships"."id" != 77 AND "memberships"."group_id" = 379) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 379 AND "memberships"."id" != 77 AND "memberships"."person_id" = 494) LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0004' AND "people"."given_name" = '' AND ("people"."id" != 494) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 494 AND "memberships"."id" != 77 AND "memberships"."group_id" = 379) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 379 AND "memberships"."id" != 77 AND "memberships"."person_id" = 494) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 494 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:53.741802"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 77 [["role", ""], ["updated_at", "2014-10-13 09:56:53.743233"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:53.744052' WHERE "people"."id" = 494 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:53.744760' WHERE "groups"."id" = 379 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:53.745526"], ["group_id", 380], ["person_id", 494], ["role", "Talker"], ["updated_at", "2014-10-13 09:56:53.745526"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 494]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:53.747437' WHERE "people"."id" = 494 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 380]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:53.749020' WHERE "groups"."id" = 380  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/surname-0004 Completed 302 Found in 24ms (ActiveRecord: 4.9ms) Started GET "/people/surname-0004" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0004"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 495]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0004' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (494) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 380) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 379) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 380) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (378, 379) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 494]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:53.844086"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:53.844086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 496]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 496]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 496]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (496) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:53.894398"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:53.894398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 381]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 381]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 381]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "381"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:53.900554"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:53.900554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:53.903352"], ["slug", "surname-0005"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 09:56:53.903352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:53.905317"], ["group_id", 382], ["person_id", 497], ["updated_at", "2014-10-13 09:56:53.905317"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 497]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:53.906777' WHERE "people"."id" = 497 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:53.907494' WHERE "groups"."id" = 382  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0005/edit" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0005"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 496]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (497) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (381, 382) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (381, 382) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 497]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/79?referer=%2Fpeople%2Fsurname-0005%2Fedit" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0005/edit", "id"=>"79"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 496]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 79]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 79]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 497]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:53.961956' WHERE "people"."id" = 497 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 382]] SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:53.964499' WHERE "groups"."id" = 382  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0005/edit Completed 302 Found in 9ms (ActiveRecord: 2.6ms) Started GET "/people/surname-0005/edit" for 127.0.0.1 at 2014-10-13 10:56:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0005"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 496]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (497) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.2ms | ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 497]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:54.029808"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:54.029808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 383]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 383]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 383]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "383"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:54.034398"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:54.034398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:54.460743"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:54.460743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 498]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (498) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.7ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"384", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:54.742134"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 09:56:54.742134"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:54.743299"], ["group_id", 384], ["leader", "t"], ["person_id", 499], ["role", "Head Honcho"], ["updated_at", "2014-10-13 09:56:54.743299"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 499]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:54.744888' WHERE "people"."id" = 499 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 384]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:54.746795' WHERE "groups"."id" = 384  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/taylor Completed 302 Found in 14ms (ActiveRecord: 2.4ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 10:56:54 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 498]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (499) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (383, 384) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (383, 384) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 499]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:54.836333"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 09:56:54.836333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:54.842850"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:54.842850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 500]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:55.145823"], ["image", "placeholder.png"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 09:56:55.145823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0008' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:55.924331"], ["image", "placeholder.png"], ["slug", "surname-0008"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 09:56:55.924331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.030695"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 09:56:56.030695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.034194"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 09:56:56.034194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"504"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 503]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '504' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 504]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.3ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.054098"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 09:56:56.054098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.057055"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 09:56:56.057055"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"506"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 505]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '506' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 506]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 506], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:56.067962"], ["updated_at", "2014-10-13 09:56:56.067962"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "d8e47e93-87ff-4f78-9a37-4f75410d43a5"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 19.0ms Sent mail to someone.else@digital.justice.gov.uk (7.4ms) Date: Mon, 13 Oct 2014 10:56:56 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543ba1e814d32_eaba3fdbecc65be41430@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/d8e47e93-87ff-4f78-9a37-4f75410d43a5?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 33ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.098147"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 09:56:56.098147"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.101456"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 09:56:56.101456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"508"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 507]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '508' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 508]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 508], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:56.111184"], ["updated_at", "2014-10-13 09:56:56.111184"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "6c0ed082-e805-4850-8efa-1723069dc037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 11.3ms Sent mail to someone.else@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 10:56:56 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543ba1e81d3ae_eaba3fdbecc65be41446@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/6c0ed082-e805-4850-8efa-1723069dc037?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 21ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.129271"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 09:56:56.129271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.133150"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 09:56:56.133150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"510"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 509]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '510' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 510]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.141880"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 09:56:56.141880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.144473"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 09:56:56.144473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"512"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 511]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '512' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 512]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.152650"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 09:56:56.152650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.155348"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 09:56:56.155348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"514"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 513]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '514' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 514]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.172040"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.172040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 515]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (515) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 45ms (Views: 39.0ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.228699"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:56.228699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (516) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (516) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (40.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 49.8ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (516) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 516) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 516 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:56.324577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 2.0ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 515]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (516) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.3ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.357923"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.357923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 517]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (517) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:56.406064"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 09:56:56.406064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (518) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (518) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 9.2ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:56 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1e873f19_eaba3fdbecc65be4145ad@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 518]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 30ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 517]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 17.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.518468"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.518468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 519]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 519]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 519]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (519) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 519]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 37.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 519]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:56.623568"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-3fee88f5-40ca-4915-9f75-57441ea492a7"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:56.623568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-3fee88f5-40ca-4915-9f75-57441ea492a7 Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user-3fee88f5-40ca-4915-9f75-57441ea492a7" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-3fee88f5-40ca-4915-9f75-57441ea492a7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 519]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3fee88f5-40ca-4915-9f75-57441ea492a7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (520) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.663814"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.663814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 521]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 521]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 521]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (521) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 38.8ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 521]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 34.4ms | ActiveRecord: 0.4ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 521]] Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:56.775661"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:56.775661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 521]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (522) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.808173"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.808173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 523]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (523) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.6ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.867439"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:56.867439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 15ms (Views: 8.6ms | ActiveRecord: 1.3ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (524) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 524) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 524 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:56:56.945114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 16ms (ActiveRecord: 2.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.2ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:56.976959"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:56.976959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 525]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (525) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.5ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0022' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:57.033871"], ["slug", "surname-0022"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 09:56:57.033871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0022/edit" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0022"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0022' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (526) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 38ms (Views: 31.9ms | ActiveRecord: 1.1ms) Started DELETE "/people/surname-0022" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0022"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0022' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (526) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 526]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 525]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 13.1ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.117390"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.117390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 527]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (527) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.165211"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:57.165211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (528) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089/edit" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (528) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 32.8ms | ActiveRecord: 1.6ms) Started PATCH "/people/test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (528) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 528) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 528 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:57.245049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:57.251245"], ["updated_at", "2014-10-13 09:56:57.251245"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "bc182b72-b6e0-4b20-961d-8769cb8e46c9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 12.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:57 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1e93fbdc_eaba3fdbecc65be41464e@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/bc182b72-b6e0-4b20-961d-8769cb8e46c9?desired_path=%2Fpeople%2Ftest-user-44018f31-a1ef-46c6-bd40-82ca4cb35089. Redirected to http://www.example.com/people/test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089 Completed 302 Found in 32ms (ActiveRecord: 2.3ms) Started GET "/people/test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44018f31-a1ef-46c6-bd40-82ca4cb35089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (528) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.296070"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.296070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 529]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 529]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 529]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (529) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:57.343999"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:56:57.343999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:57.347721"], ["updated_at", "2014-10-13 09:56:57.347721"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "4d1a97b3-44d7-4e7d-ad95-6baafb6b769f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/4d1a97b3-44d7-4e7d-ad95-6baafb6b769f?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"4d1a97b3-44d7-4e7d-ad95-6baafb6b769f"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '4d1a97b3-44d7-4e7d-ad95-6baafb6b769f' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 530]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (530) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 20.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.394824"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.394824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 531]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (531) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:57.440014"], ["email", "test.user"], ["slug", "test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 09:56:57.440014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf/edit" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (532) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0e39b293-8a1b-494e-828d-22e4e759f9bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (532) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 532]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 531]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.519168"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.519168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 533]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (533) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:57.565643"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 09:56:57.565643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b/edit" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (534) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.3ms | ActiveRecord: 1.2ms) Started DELETE "/people/test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ab694887-1e1b-4c5e-9272-3a98ae74d75b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (534) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 534]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 533]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.2ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.651158"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.651158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 535]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 535]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (535) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.7ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 535]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 42ms (Views: 39.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 535]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:57.764367"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-fffe0a20-136a-46eb-829f-5aa6139bc145"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:57.764367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-fffe0a20-136a-46eb-829f-5aa6139bc145 Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-fffe0a20-136a-46eb-829f-5aa6139bc145" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-fffe0a20-136a-46eb-829f-5aa6139bc145"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 535]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-fffe0a20-136a-46eb-829f-5aa6139bc145' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (536) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.794401"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.794401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 537]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (537) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.841530"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:57.841530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (538) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (538) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (538) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 538) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 538 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:57.916733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:57.925214"], ["updated_at", "2014-10-13 09:56:57.925214"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "a11b00f4-897b-4f84-830a-11a404957769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 13.1ms Sent mail to bob.smithe@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 10:56:57 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543ba1e9e3ff5_eaba3fdbecc65be4147c9@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/a11b00f4-897b-4f84-830a-11a404957769?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:57.943025"], ["updated_at", "2014-10-13 09:56:57.943025"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "ee18cb4b-370e-405d-9d4b-cb5634b12938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 12.5ms Sent mail to bob.smith@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 10:56:57 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1e9e8c46_eaba3fdbecc65be41481@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/ee18cb4b-370e-405d-9d4b-cb5634b12938?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 52ms (ActiveRecord: 2.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 537]] Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (538) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:57.990494"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:57.990494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 539]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (539) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.040047"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-356567a3-33cc-4460-bff5-22af468a1692"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.040047"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-356567a3-33cc-4460-bff5-22af468a1692" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-356567a3-33cc-4460-bff5-22af468a1692"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-356567a3-33cc-4460-bff5-22af468a1692' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (540) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-356567a3-33cc-4460-bff5-22af468a1692/edit" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-356567a3-33cc-4460-bff5-22af468a1692"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-356567a3-33cc-4460-bff5-22af468a1692' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (540) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.4ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-356567a3-33cc-4460-bff5-22af468a1692" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-356567a3-33cc-4460-bff5-22af468a1692"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-356567a3-33cc-4460-bff5-22af468a1692' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (540) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 540) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 540 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:56:58.128143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-356567a3-33cc-4460-bff5-22af468a1692 Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/test-user-356567a3-33cc-4460-bff5-22af468a1692" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-356567a3-33cc-4460-bff5-22af468a1692"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-356567a3-33cc-4460-bff5-22af468a1692' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (540) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.156822"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.156822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 541]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 541]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 541]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (541) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.6ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 541]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.4ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 541]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:58.261438"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.261438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:58.267480"], ["updated_at", "2014-10-13 09:56:58.267480"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "0ffd76c6-fe30-4746-befd-3adbb22a9725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 11.9ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:58 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1ea43acd_eaba3fdbecc65be414997@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/0ffd76c6-fe30-4746-befd-3adbb22a9725?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 28ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 541]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (542) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.311083"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.311083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 543]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 543]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 543]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (543) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.8ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 543]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.4ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 543]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:56:58.410122"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-e81b799c-a4be-4286-b066-5aaa441ca543"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.410122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e81b799c-a4be-4286-b066-5aaa441ca543 Completed 302 Found in 11ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-e81b799c-a4be-4286-b066-5aaa441ca543" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e81b799c-a4be-4286-b066-5aaa441ca543"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 543]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e81b799c-a4be-4286-b066-5aaa441ca543' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (544) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 9.0ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.451238"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.451238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 545]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (545) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.497378"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.497378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110/edit" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 33.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (546) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 546) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 546 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:56:58.574587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110 Completed 302 Found in 12ms (ActiveRecord: 2.0ms) Started GET "/people/test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8e7a8ed4-83a5-4519-9db6-93cb053b6110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.604526"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.604526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 547]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (547) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 43ms (Views: 37.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:58.655878"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 09:56:58.655878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7/edit" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (548) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-39a1ecbc-924c-4cbd-a24c-7764de41c3a7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (548) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 548]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 547]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.741458"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.741458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 549]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (549) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.9ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:58.796070"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.796070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (550) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (550) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (550) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 550) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 550 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:56:58.871040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (550) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.3ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.901175"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:58.901175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 551]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (551) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:58.947331"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:58.947331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (552) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 552) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 552 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 09:56:59.024478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.030542"], ["updated_at", "2014-10-13 09:56:59.030542"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "328a95a5-feb8-4e11-8650-8d92e7fffde4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 12.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1eb9f88_eaba3fdbecc65be41509b@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/328a95a5-feb8-4e11-8650-8d92e7fffde4?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 31ms (ActiveRecord: 2.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:59.074859"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:56:59.074859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 553]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (553) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:59.135643"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:56:59.135643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (554) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 554) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 554 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:56:59.213367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.220579"], ["updated_at", "2014-10-13 09:56:59.220579"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "22be2d09-92b7-4017-b752-d8ca32ca7bf0"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 9.2ms Sent mail to bob.smith@digital.justice.gov.uk (5.7ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543ba1eb37931_eaba3fdbecc65be4151bc@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/22be2d09-92b7-4017-b752-d8ca32ca7bf0?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 29ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.259974"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.259974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 386]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 386]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 386]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "386"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.265113"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.265113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.267899"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:56:59.267899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.271582"], ["updated_at", "2014-10-13 09:56:59.271582"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "37d1340e-37d6-44ea-a242-bf698851744b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/37d1340e-37d6-44ea-a242-bf698851744b" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"37d1340e-37d6-44ea-a242-bf698851744b"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '37d1340e-37d6-44ea-a242-bf698851744b' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 555]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 555]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 555]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (555) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.329285"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.329285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 388]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "388"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.334261"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.334261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.339096"], ["updated_at", "2014-10-13 09:56:59.339096"], ["user_email", "example.user.18@digital.justice.gov.uk"], ["value", "22f9aa01-660b-4670-920b-e2879e8055b9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/22f9aa01-660b-4670-920b-e2879e8055b9" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"22f9aa01-660b-4670-920b-e2879e8055b9"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '22f9aa01-660b-4670-920b-e2879e8055b9' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.18@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-18' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:59.346385"], ["email", "example.user.18@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-18"], ["surname", "user"], ["updated_at", "2014-10-13 09:56:59.346385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 556]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 556]] Redirected to http://www.example.com/people/example-user-18/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/example-user-18/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-18"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 556]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-18' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (556) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.403410"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.403410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 390]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 390]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 390]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "390"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.411113"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.411113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.8ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.461872"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.461872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 392]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 392]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 392]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "392"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.466878"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.466878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.485810"], ["updated_at", "2014-10-13 09:56:59.485810"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "d0d3538c-0b2f-4c87-8fe8-e7e9f309021f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 9.3ms Sent mail to james.darling@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543ba1eb7a288_eaba3fdbecc65be4152bb@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/d0d3538c-0b2f-4c87-8fe8-e7e9f309021f If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 5.0ms | ActiveRecord: 0.4ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.521405"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.521405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 394]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "394"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.526472"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.526472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.529426"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 09:56:59.529426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.533982"], ["updated_at", "2014-10-13 09:56:59.533982"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "62c6502a-ae21-4cca-94d7-8188b0596f55"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 557]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 13.9ms Sent mail to test.user@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1eb851fd_eaba3fdbecc65be415380@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/62c6502a-ae21-4cca-94d7-8188b0596f55?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/62c6502a-ae21-4cca-94d7-8188b0596f55?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"62c6502a-ae21-4cca-94d7-8188b0596f55"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '62c6502a-ae21-4cca-94d7-8188b0596f55' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (557) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.605183"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.605183"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 396]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 396]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 396]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "396"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.610261"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.610261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.645725"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.645725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 398]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 398]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 398]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "398"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.650403"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.650403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.654673"], ["updated_at", "2014-10-13 09:56:59.654673"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "8f12ccaa-cb80-4ee2-af31-855f2e4c0e65"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/8f12ccaa-cb80-4ee2-af31-855f2e4c0e65" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"8f12ccaa-cb80-4ee2-af31-855f2e4c0e65"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '8f12ccaa-cb80-4ee2-af31-855f2e4c0e65' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:56:59.662361"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 09:56:59.662361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 558]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 558]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 558]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (558) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:56:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.730005"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 09:56:59.730005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.737135"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.737135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 559]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.746253"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 09:56:59.746253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.753297"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.753297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 560]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.763325"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 09:56:59.763325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 561]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.770700"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 09:56:59.770700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 562]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.777961"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 09:56:59.777961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.780534"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 09:56:59.780534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"564"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 563]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '564' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 564]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 564]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 2.0ms | ActiveRecord: 3.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.801419"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 09:56:59.801419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.804325"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 09:56:59.804325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.815834"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.815834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 402]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 402]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 402]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "402"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.821274"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.821274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.823598"], ["group_id", 403], ["person_id", 566], ["updated_at", "2014-10-13 09:56:59.823598"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 566]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:59.825370' WHERE "people"."id" = 566 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:59.826099' WHERE "groups"."id" = 403  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"566"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 565]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '566' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 566]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 566]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 565], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.31@digital.justice.gov.uk"], ["subject_id", 566]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.7ms Sent mail to example.user.31@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: example.user.31@digital.justice.gov.uk Message-ID: <543ba1ebd0d6b_eaba3fdbecc65be415440@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0033 has said that they believe the information on Surname-0034 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 33ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.864878"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 09:56:59.864878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.867969"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 09:56:59.867969"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.876963"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.876963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 404]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 404]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 404]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "404"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.882192"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.882192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.884449"], ["group_id", 405], ["person_id", 568], ["updated_at", "2014-10-13 09:56:59.884449"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 568]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:59.885903' WHERE "people"."id" = 568 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:59.886613' WHERE "groups"."id" = 405  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"568"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 567]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '568' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 568]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 568]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 567], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.33@digital.justice.gov.uk"], ["subject_id", 568]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.8ms Sent mail to example.user.33@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: example.user.33@digital.justice.gov.uk Message-ID: <543ba1ebdbe3e_eaba3fdbecc65be41554e@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0035 has said that they believe the information on Surname-0036 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 568]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.911050"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 09:56:59.911050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.914356"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 09:56:59.914356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.922170"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.922170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 406]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 406]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 406]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "406"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.927809"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.927809"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.930380"], ["group_id", 407], ["person_id", 570], ["updated_at", "2014-10-13 09:56:59.930380"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 570]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:59.931912' WHERE "people"."id" = 570 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:59.932604' WHERE "groups"."id" = 407  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"570"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 569]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '570' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 570]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 570]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 569], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.35@digital.justice.gov.uk"], ["subject_id", 570]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.4ms Sent mail to example.user.35@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: example.user.35@digital.justice.gov.uk Message-ID: <543ba1ebe6e97_eaba3fdbecc65be41564f@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0037 has said that they believe the information on Surname-0038 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.954599"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 09:56:59.954599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.957488"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 09:56:59.957488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.965036"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.965036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 408]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 408]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 408]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "408"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:56:59.969848"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:56:59.969848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:56:59.972322"], ["group_id", 409], ["person_id", 572], ["updated_at", "2014-10-13 09:56:59.972322"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 572]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:56:59.973892' WHERE "people"."id" = 572 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:56:59.974617' WHERE "groups"."id" = 409  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"572"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 571]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '572' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 572]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 572]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 571], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.37@digital.justice.gov.uk"], ["subject_id", 572]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.7ms Sent mail to example.user.37@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:56:59 +0100 From: support@example.com To: example.user.37@digital.justice.gov.uk Message-ID: <543ba1ebf1468_eaba3fdbecc65be41571c@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0039 has said that they believe the information on Surname-0040 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.997224"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 09:56:59.997224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:56:59.999965"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 09:56:59.999965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.008030"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.008030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 410]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 410]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 410]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "410"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.012634"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.012634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.014602"], ["group_id", 411], ["person_id", 574], ["updated_at", "2014-10-13 09:57:00.014602"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 574]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.015925' WHERE "people"."id" = 574 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.016599' WHERE "groups"."id" = 411  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"574"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 573]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '574' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 574]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 574]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 573], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.39@digital.justice.gov.uk"], ["subject_id", 574]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.9ms Sent mail to example.user.39@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 10:57:00 +0100 From: support@example.com To: example.user.39@digital.justice.gov.uk Message-ID: <543ba1ec76c8_eaba3fdbecc65be4158a3@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0041 has said that they believe the information on Surname-0042 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.040813"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 09:57:00.040813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.043738"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 09:57:00.043738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"576"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 575]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '576' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 576]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.052837"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 09:57:00.052837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.055211"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 09:57:00.055211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"578"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 577]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '578' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 578]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.062018"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 09:57:00.062018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.064333"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 09:57:00.064333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"580"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 579]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '580' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 580]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.072488"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 09:57:00.072488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 581]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.083138"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 09:57:00.083138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 582]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.096027"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 09:57:00.096027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 583]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.105781"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 09:57:00.105781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0014", "team_email_address"=>"example.user.41@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 584]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.112864"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.112864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0014 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.118357"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 09:57:00.118357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0015", "team_email_address"=>"example.user.42@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 585]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.125558"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.125558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0015 Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.131865"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 09:57:00.131865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0016", "team_email_address"=>"example.user.43@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 586]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.138402"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.138402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0016 Completed 302 Found in 5ms (ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.145025"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 09:57:00.145025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.153720"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.153720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 415]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 415]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 415]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "415"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.158517"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.158517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0017"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 587]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0017' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (416) ORDER BY people.surname Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.171628"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 09:57:00.171628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.179168"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.179168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 417]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 417]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 417]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "417"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.184004"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.184004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0018"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 588]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0018' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (418) ORDER BY people.surname Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.195841"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 09:57:00.195841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 589]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.203544"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 09:57:00.203544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 590]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.211272"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 09:57:00.211272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.219187"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.219187"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "419"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.224328"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.224328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0019"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 591]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0019' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (420) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 419]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 420) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 420) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.240765"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 09:57:00.240765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.248444"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.248444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "421"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.253297"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.253297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 592]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0020' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (422) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 421]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 422) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 422) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 23ms (Views: 0.9ms | ActiveRecord: 2.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.282208"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 09:57:00.282208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.289745"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.289745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "423"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.294039"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.294039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0021"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 593]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0021' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (424) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 423]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 424) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 424) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.308744"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 09:57:00.308744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.315990"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.315990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "425"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.320955"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.320955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0023", "team_email_address"=>"example.user.56@digital.justice.gov.uk"}, "id"=>"group-0022"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 594]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0022' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (426) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 425]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 426) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0023' AND "groups"."id" != 426) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 426 [["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.332536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0023 Completed 302 Found in 10ms (ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 426]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.338559"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 09:57:00.338559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.348125"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.348125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 427]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 427]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 427]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "427"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.353970"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.353970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0024", "team_email_address"=>"example.user.57@digital.justice.gov.uk"}, "id"=>"group-0024"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 595]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0024' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (428) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0024' AND "groups"."id" != 428) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0024 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.366269"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 09:57:00.366269"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.374009"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.374009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 429]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 429]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 429]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "429"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.378684"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.378684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0025", "team_email_address"=>"example.user.59@digital.justice.gov.uk"}, "id"=>"group-0025"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 596]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0025' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (430) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0025' AND "groups"."id" != 430) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0025 Completed 302 Found in 7ms (ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.391866"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 09:57:00.391866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 597]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.399046"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 09:57:00.399046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.405299"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.405299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 598]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.412179"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 09:57:00.412179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.418435"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.418435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 432]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 432]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 432]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "432"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.423621"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.423621"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 599]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.430981"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 09:57:00.430981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.434221"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.434221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 434]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "434"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.439366"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.439366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0028"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 600]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0028' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (435) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 434]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '434/435/%' OR "groups"."ancestry" = '434/435')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '434/435' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 435]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0027 Completed 302 Found in 9ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.454782"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 09:57:00.454782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.462744"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.462744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 436]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 436]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 436]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "436"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.467587"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.467587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 601]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0029' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (437) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 436]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 436]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '436/437/%' OR "groups"."ancestry" = '436/437')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '436/437' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 437]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.482281"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 09:57:00.482281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.484911"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:57:00.484911"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.495609"], ["event", "create"], ["item_id", 603], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 603]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 603]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.501162"], ["event", "destroy"], ["item_id", 603], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 603\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 09:57:00.484911000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 603], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"47"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 602]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 47]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 603]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 603) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.484911"], ["id", 603], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 09:57:00.516601"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.518769"], ["event", "create"], ["item_id", 603], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 14ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.525596"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 09:57:00.525596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.528654"], ["slug", "surname-0072"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 09:57:00.528654"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.530348"], ["event", "create"], ["item_id", 605], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0072\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.537381"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.537381"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.540130"], ["event", "create"], ["item_id", 438], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.69@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 438]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 438]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "438"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.545081"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.545081"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.547205"], ["event", "create"], ["item_id", 439], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0030\nteam_email_address:\n- \n- example.user.68@digital.justice.gov.uk\nancestry:\n- \n- '438'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.548733"], ["group_id", 439], ["person_id", 605], ["updated_at", "2014-10-13 09:57:00.548733"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.551811"], ["event", "create"], ["item_id", 86], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 605\ngroup_id:\n- \n- 439\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.552984' WHERE "people"."id" = 605 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.554079' WHERE "groups"."id" = 439  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 86]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.556712"], ["event", "destroy"], ["item_id", 86], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 86\ngroup_id: 439\nperson_id: 605\nrole: \ncreated_at: &1 2014-10-13 09:57:00.548733000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 86], ["item_type", "Peoplefinder::Membership"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.558920' WHERE "people"."id" = 605 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.560114' WHERE "groups"."id" = 439  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"53"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 604]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 53]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 86]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.570816"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 09:57:00.570816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.573767"], ["slug", "surname-0074"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 09:57:00.573767"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.575821"], ["event", "create"], ["item_id", 607], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0074\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"54"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 606]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 54]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 607]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 607]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 607]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.586150"], ["event", "destroy"], ["item_id", 607], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 607\ngiven_name: \nsurname: Surname-0074\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:57:00.573767000 Z\nupdated_at: 2014-10-13 09:57:00.573767000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0073"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 607], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 11ms (ActiveRecord: 2.0ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 607]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.593691"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 09:57:00.593691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.596403"], ["slug", "surname-0076"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 09:57:00.596403"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.598108"], ["event", "create"], ["item_id", 609], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0076\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.604636"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.604636"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.606582"], ["event", "create"], ["item_id", 440], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.71@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 440]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 440]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 440]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "440"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.612175"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.612175"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.614324"], ["event", "create"], ["item_id", 441], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0031\nteam_email_address:\n- \n- example.user.70@digital.justice.gov.uk\nancestry:\n- \n- '440'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.615619"], ["group_id", 441], ["person_id", 609], ["updated_at", "2014-10-13 09:57:00.615619"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.617043"], ["event", "create"], ["item_id", 87], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 609\ngroup_id:\n- \n- 441\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.617711' WHERE "people"."id" = 609 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.618443' WHERE "groups"."id" = 441  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"59"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 608]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 59]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 87]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.656099"], ["updated_at", "2014-10-13 09:57:00.656099"], ["user_email", "example.user.72@digital.justice.gov.uk"], ["value", "986448d5-11a7-47ed-8357-6089ee519336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 43]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.672636"], ["updated_at", "2014-10-13 09:57:00.672636"], ["user_email", "example.user.74@digital.justice.gov.uk"], ["value", "dc421fdf-efc4-4282-bfee-b38d3df11f71"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.676972"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 09:57:00.676972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.680838"], ["updated_at", "2014-10-13 09:57:00.680838"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "caee0a44-2548-4500-ae8d-ab257ea48e5c"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.685767"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 09:57:00.685767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.688259"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 09:57:00.688259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.694751"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.694751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 442]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "442"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.700158"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.700158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.701764"], ["group_id", 443], ["person_id", 612], ["updated_at", "2014-10-13 09:57:00.701764"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.702610' WHERE "people"."id" = 612 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.703361' WHERE "groups"."id" = 443  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"88"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 611]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 88]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 88]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 612]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.708315' WHERE "people"."id" = 612 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 443]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.709726' WHERE "groups"."id" = 443  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.726049"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 09:57:00.726049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.729716"], ["slug", "surname-0081"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 09:57:00.729716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.735932"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.735932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 444]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 444]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 444]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "444"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.740396"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.740396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.741619"], ["group_id", 445], ["person_id", 614], ["updated_at", "2014-10-13 09:57:00.741619"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.742333' WHERE "people"."id" = 614 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.742971' WHERE "groups"."id" = 445  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"89"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 613]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 89]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 89]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 614]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.747568' WHERE "people"."id" = 614 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 445]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.749099' WHERE "groups"."id" = 445  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 89]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.759223"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:00.759223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 615]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 615]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 615]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (615) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:00.804342"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.804342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "446"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.810041"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.810041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 447]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 447]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 447]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "446/447"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:00.815560"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.815560"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 446]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "446"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:00.824982"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.824982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 449]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 449]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 449]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "446/449"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:00.831221"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:00.831221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.834068"], ["slug", "surname-0082"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 09:57:00.834068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.835712"], ["group_id", 448], ["person_id", 616], ["updated_at", "2014-10-13 09:57:00.835712"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.836404' WHERE "people"."id" = 616 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.837028' WHERE "groups"."id" = 448  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:00.838290"], ["group_id", 450], ["person_id", 616], ["updated_at", "2014-10-13 09:57:00.838290"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:00.838980' WHERE "people"."id" = 616 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:00.839655' WHERE "groups"."id" = 450  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 615]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (450) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (446, 449, 450) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.7ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 450]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (7.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '446/449/450' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '446/449/450' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 450]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 25.6ms | ActiveRecord: 2.6ms) Started GET "/people/surname-0082" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0082"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 615]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0082' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (616) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 450]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (446, 447, 448) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (446, 449, 450) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (446, 447, 448) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (446, 449, 450) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.913770"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:00.913770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 617]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 617]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 617]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (617) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.959727"], ["slug", "surname-0083"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 09:57:00.959727"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0083" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0083"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 617]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0083' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (618) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:00.985951"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:00.985951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 619]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 619]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 619]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (619) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.032118"], ["slug", "surname-0084"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 09:57:01.032118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0084" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0084"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 619]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0084' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (620) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:01.084207"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:01.084207"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 621]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 621]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (621) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.6ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.193019"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.193019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 451]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 451]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 451]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "451"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:01.198378"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.198378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0034" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0034"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:01.219087"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:01.219087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0034 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0034" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 622]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0034' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (452) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (451, 452) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 452]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '451/452' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '451/452' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 452]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.244639"], ["slug", "surname-0085"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 09:57:01.244639"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.248524"], ["slug", "surname-0086"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 09:57:01.248524"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 624 [["updated_at", "2014-10-13 09:57:01.249944"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.253727"], ["slug", "surname-0087"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 09:57:01.253727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:01.262891"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:01.262891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 626]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 626]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (626) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.312388"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.312388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 453]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "453"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:01.317838"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.317838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 454]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 454]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 454]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "453/454"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:01.323257"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.323257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 455]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 455]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 455]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "453/454/455"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:01.328555"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.328555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 626]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (456) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (453, 454, 455, 456) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 456]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '453/454/455/456' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '453/454/455/456' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 456]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:01.363439"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:01.363439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 627]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 627]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 627]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (627) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.0ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.425493"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.425493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 457]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 457]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 457]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "457"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:01.430940"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.430940"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 458]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 458]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 458]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "457/458"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:01.436165"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.436165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 459]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 459]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 459]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "457/458/459"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:01.441657"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.441657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.444616"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:57:01.444616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.446319"], ["group_id", 458], ["person_id", 628], ["updated_at", "2014-10-13 09:57:01.446319"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.447108' WHERE "people"."id" = 628 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.447778' WHERE "groups"."id" = 458  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.450171"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:57:01.450171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.451880"], ["group_id", 458], ["person_id", 629], ["updated_at", "2014-10-13 09:57:01.451880"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.452634' WHERE "people"."id" = 629 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.453278' WHERE "groups"."id" = 458  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.455797"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:57:01.455797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.457407"], ["group_id", 458], ["person_id", 630], ["updated_at", "2014-10-13 09:57:01.457407"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.458039' WHERE "people"."id" = 630 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.458663' WHERE "groups"."id" = 458  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 627]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (458) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (457, 458) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 458]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '457/458' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '457/458' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '457/458' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:01.492624"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:01.492624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 631]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 631]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 631]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (631) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.541936"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.541936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 461]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "461"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:01.549464"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.549464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 462]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 462]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 462]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "461/462"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:01.555290"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.555290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 463]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 463]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 463]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "461/462/463"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:01.560631"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.560631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.563534"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:57:01.563534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.565974"], ["group_id", 464], ["person_id", 632], ["updated_at", "2014-10-13 09:57:01.565974"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.566800' WHERE "people"."id" = 632 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.567524' WHERE "groups"."id" = 464  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.570574"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:57:01.570574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.572613"], ["group_id", 464], ["person_id", 633], ["updated_at", "2014-10-13 09:57:01.572613"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.573427' WHERE "people"."id" = 633 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.574130' WHERE "groups"."id" = 464  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.576850"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:57:01.576850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:01.578354"], ["group_id", 464], ["person_id", 634], ["updated_at", "2014-10-13 09:57:01.578354"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:01.578989' WHERE "people"."id" = 634 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:01.579574' WHERE "groups"."id" = 464  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 631]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (464) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (461, 462, 463, 464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '461/462/463/464' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '461/462/463/464' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:01.622653"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.622653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 465]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 465]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 465]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "465"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:01.627872"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.627872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 466]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 466]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 466]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "465/466"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:01.632966"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.632966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 467]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 467]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 467]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "465/466/467"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:01.638383"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:01.638383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:02.073159"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:02.073159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 635]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 635]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (635) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.5ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:02.331581"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:02.331581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 469]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 469]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 469]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "469"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:02.337780"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:02.337780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 470]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 470]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 470]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "469/470"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:02.342970"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:02.342970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 471]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 471]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 471]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "469/470/471"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:02.347958"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:02.347958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:02.786664"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:02.786664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 636]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (636) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 636]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (472) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (469, 470, 471, 472) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 472]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '469/470/471/472' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '469/470/471/472' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 472]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:03.104422"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:03.104422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 637]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 637]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 637]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (637) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.157954"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.157954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "473"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:03.163561"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.163561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 474]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 474]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 474]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "473/474"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:03.169298"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.169298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 475]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 475]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 475]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "473/474/475"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:03.174513"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.174513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 473) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 473 [["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.179541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "473"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:03.185554"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.185554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 637]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (477) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (473, 477) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 477]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '473/477' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '473/477' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 477]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 2.4ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 637]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (477) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (473, 477) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 473]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (473) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '473/477' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 21.8ms | ActiveRecord: 3.1ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 637]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (477) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (473, 477) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 477 OR "groups"."ancestry" ILIKE '473/477/%') OR "groups"."ancestry" = '473/477')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.2ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (477) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.5ms | ActiveRecord: 3.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:03.276764"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:03.276764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 638]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 638]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (638) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (13.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.3ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.340506"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.340506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 478]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 478]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "478"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:03.346125"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.346125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 479]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 479]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "478/479"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:03.351446"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.351446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 480]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 480]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "478/479/480"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:03.357079"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.357079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (478) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (478) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 478]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.7ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (479) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (478, 479) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 479]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 2.0ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (480) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (478, 479, 480) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 480]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479/480' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479/480' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '478/479/480' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:03.430281"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:03.430281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 639]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 639]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 639]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (639) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.481028"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.481028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 482]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 482]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 482]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "482"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:03.487130"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.487130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 483]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 483]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "482/483"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:03.492805"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.492805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 484]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 484]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 484]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "482/483/484"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:03.498336"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.498336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.501770"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 09:57:03.501770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:03.503577"], ["group_id", 483], ["person_id", 640], ["updated_at", "2014-10-13 09:57:03.503577"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:03.504287' WHERE "people"."id" = 640 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:03.504980' WHERE "groups"."id" = 483  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.507355"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 09:57:03.507355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:03.508908"], ["group_id", 483], ["person_id", 641], ["updated_at", "2014-10-13 09:57:03.508908"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:03.509625' WHERE "people"."id" = 641 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:03.510300' WHERE "groups"."id" = 483  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.512887"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 09:57:03.512887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:03.514480"], ["group_id", 483], ["person_id", 642], ["updated_at", "2014-10-13 09:57:03.514480"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:03.515188' WHERE "people"."id" = 642 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:03.515797' WHERE "groups"."id" = 483  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 639]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (483) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (482, 483) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 483]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '482/483' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '482/483' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '482/483' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.2ms | ActiveRecord: 1.9ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 10:57:03 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 639]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (483) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (482, 483) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 483 OR "groups"."ancestry" ILIKE '482/483/%') OR "groups"."ancestry" = '482/483')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (485,484,483) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:03.569896"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:03.569896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:03.573019"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:57:03.573019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 643]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:04.601872"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:04.601872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 644]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 644]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (644) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 644]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (643) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 643]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 1.0ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.3ms) DELETE FROM "versions"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:04.762411"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:04.762411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:04.775719"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:04.775719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:04.790898"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:04.790898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:04.801560"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:04.801560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:04.813699"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:04.813699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.834930"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.834930"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.848291"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.848291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.853428"], ["slug", "surname-0088"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 09:57:04.853428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.860008"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.860008"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 489]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 489]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 489]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "489"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:04.864721"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.864721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.866093"], ["group_id", 490], ["person_id", 650], ["updated_at", "2014-10-13 09:57:04.866093"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:04.866769' WHERE "people"."id" = 650 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:04.867401' WHERE "groups"."id" = 490  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.877573"], ["slug", "surname-0089"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 09:57:04.877573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.883998"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.883998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 491]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 491]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "491"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:04.888672"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.888672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.890238"], ["group_id", 492], ["person_id", 651], ["updated_at", "2014-10-13 09:57:04.890238"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:04.891014' WHERE "people"."id" = 651 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:04.891743' WHERE "groups"."id" = 492  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.901715"], ["slug", "surname-0090"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 09:57:04.901715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.908939"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.908939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 493]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 493]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 493]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "493"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:04.915150"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.915150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:04.916747"], ["group_id", 494], ["person_id", 652], ["updated_at", "2014-10-13 09:57:04.916747"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:04.917500' WHERE "people"."id" = 652 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:04.918207' WHERE "groups"."id" = 494  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:04.926158"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:04.926158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:04.935166"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:04.935166"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 653]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 653]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 653]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (653) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 653]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 10ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:05.002237"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:57:05.002237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:05.017277"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 09:57:05.017277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:05.023154"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:05.023154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.026590"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:57:05.026590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.052248"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 09:57:05.052248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 658]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.060962"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 09:57:05.060962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 659]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.068491"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 09:57:05.068491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 660]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.080313"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.080313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 496]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 496]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 496]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "496"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:05.085286"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.085286"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "496/497"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.092152"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.092152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "496/497/498"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.110776"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.110776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 498]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "496/497/498"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.116202"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.116202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "496/497"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.121758"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.121758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 497]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.131238"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.131238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 502]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 502]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 502]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.8ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "502"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:05.136288"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.136288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "502/503"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.143137"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.143137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "502/503/504"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.148731"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.148731"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 504]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "502/503/504"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.153899"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.153899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 503]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "502/503"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.159126"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.159126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 503 OR "groups"."ancestry" ILIKE '502/503/%') OR "groups"."ancestry" = '502/503')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.170853"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.170853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 508]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 508]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 508]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "508"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:05.177537"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.177537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "508/509"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.182372"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.182372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "508/509/510"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.189746"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.189746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 510]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "508/509/510"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:05.195955"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.195955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 509]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "508/509"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:05.201334"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.201334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 509 OR "groups"."ancestry" ILIKE '508/509/%') OR "groups"."ancestry" = '508/509')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.206228"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:57:05.206228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:05.209450"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:57:05.209450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.216072"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.216072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 514]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 514]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 514]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "514"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:05.221476"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:05.221476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:05.223605"], ["group_id", 515], ["person_id", 662], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:05.223605"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 662]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:05.225013' WHERE "people"."id" = 662 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:05.225711' WHERE "groups"."id" = 515  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 661]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 662]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:06.255013"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:57:06.255013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:06.259196"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:57:06.259196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:06.266401"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:06.266401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 516]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 516]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 516]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "516"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:06.271068"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:06.271068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:06.273019"], ["group_id", 517], ["person_id", 664], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:06.273019"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 664]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:06.274485' WHERE "people"."id" = 664 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:06.275300' WHERE "groups"."id" = 517  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 663]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 664]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 661) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 661) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 661) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:07.295801"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:57:07.295801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:07.298297"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:57:07.298297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:07.304807"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:07.304807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 518]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 518]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 518]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "518"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:07.310500"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:07.310500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:07.312617"], ["group_id", 519], ["person_id", 666], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:07.312617"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 666]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:07.314001' WHERE "people"."id" = 666 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:07.314625' WHERE "groups"."id" = 519  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 665]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 666]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (666, 662, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (666, 662, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (666, 662, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:08.334139"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:57:08.334139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:08.337369"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:57:08.337369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:08.344068"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:08.344068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 520]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 520]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 520]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "520"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:08.348595"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:08.348595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:08.350524"], ["group_id", 521], ["person_id", 668], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:08.350524"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 668]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:08.351898' WHERE "people"."id" = 668 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:08.352569' WHERE "groups"."id" = 521  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 667]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 668]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662, 668, 666, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662, 668, 666, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (662, 668, 666, 664) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:09.375191"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 09:57:09.375191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:09.377863"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 09:57:09.377863"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:09.385132"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:09.385132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 522]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 522]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 522]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "522"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:09.390076"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:09.390076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:09.392046"], ["group_id", 523], ["person_id", 670], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:09.392046"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 670]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:09.393553' WHERE "people"."id" = 670 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:09.394198' WHERE "groups"."id" = 523  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 669]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 670]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 667, 661, 669, 665) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 667, 661, 669, 665) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (663, 667, 661, 669, 665) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.1ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.471399"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.471399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 524) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 524 [["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.474568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.490612"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.490612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 525) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 525 [["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.494404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 525) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 525 [["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.499289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 525) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 525 [["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.502500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.512120"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.512120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 526) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 526 [["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.515004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 526) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 526 [["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.518138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 526) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 526 [["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.522545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.533252"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.533252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 527) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 527 [["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.536207"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 527) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 527 [["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.539191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 527) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 527 [["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.542125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 527) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 527 [["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.547744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.551742"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 09:57:10.551742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.558920"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.558920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "528"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:10.563818"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.563818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 528) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 528 [["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.566817"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 528]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "528"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:10.574237"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.574237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.576694"], ["group_id", 530], ["person_id", 671], ["role", "Cleaner"], ["updated_at", "2014-10-13 09:57:10.576694"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 671]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:10.578570' WHERE "people"."id" = 671 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:10.579368' WHERE "groups"."id" = 530  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.580806"], ["group_id", 529], ["person_id", 671], ["role", "Designer"], ["updated_at", "2014-10-13 09:57:10.580806"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 671]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:10.582155' WHERE "people"."id" = 671 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:10.582755' WHERE "groups"."id" = 529  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 671]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.588755"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 09:57:10.588755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 672]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.592950"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 09:57:10.592950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 673]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.597972"], ["slug", "surname-0096"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 09:57:10.597972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.601313"], ["slug", "surname-0097"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 09:57:10.601313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0100' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.606899"], ["slug", "surname-0100"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 09:57:10.606899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 676]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0101' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.611737"], ["slug", "surname-0101"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 09:57:10.611737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (1.9ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.631127"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:10.631127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 531]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 531]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 531]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0055-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "531"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:10.640087"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 09:57:10.640087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.642883"], ["group_id", 532], ["person_id", 677], ["updated_at", "2014-10-13 09:57:10.642883"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 677]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:10.644637' WHERE "people"."id" = 677 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:10.645439' WHERE "groups"."id" = 532  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 677]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.650885"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 09:57:10.650885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.655531"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:10.655531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"679"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 678]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '679' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 679]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.667214"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 09:57:10.667214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.671867"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:10.671867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"681"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 680]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '681' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 681]] Redirected to http://test.host/people/doe?cache_bust=1413194230 Completed 302 Found in 4ms (ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.683763"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 09:57:10.683763"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.686515"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 09:57:10.686515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"683"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 682]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '683' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 683]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.694388"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 09:57:10.694388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.697198"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:10.697198"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 684]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.705167"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:57:10.705167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.707606"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:57:10.707606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 687], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 686]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to recipient@example.com (4.4ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: recipient@example.com Message-ID: <543ba1f6aea26_eaba3fdbecc65be4159b6@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.723425"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:57:10.723425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.725917"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:57:10.725917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 689], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 688]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.0ms Sent mail to recipient@example.com (4.8ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: recipient@example.com Message-ID: <543ba1f6b2eea_eaba3fdbecc65be4160be@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.741205"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:57:10.741205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.743770"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:57:10.743770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 691], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 690]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.0ms Sent mail to recipient@example.com (4.3ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: recipient@example.com Message-ID: <543ba1f6b7436_eaba3fdbecc65be41615e@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.759070"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:57:10.759070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.761475"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:57:10.761475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 693], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 692]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.0ms Sent mail to recipient@example.com (4.4ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: recipient@example.com Message-ID: <543ba1f6bb960_eaba3fdbecc65be4162f7@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.777572"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 09:57:10.777572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.781117"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 09:57:10.781117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 695], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 694]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.6ms Sent mail to recipient@example.com (4.8ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: recipient@example.com Message-ID: <543ba1f6c15a8_eaba3fdbecc65be41634@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.800268"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 09:57:10.800268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.804334"], ["updated_at", "2014-10-13 09:57:10.804334"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "9334ec09-220e-4102-b269-9c87aa525bda"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 696]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.3ms Sent mail to test.user@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1f6c662f_eaba3fdbecc65be4164fa@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/9334ec09-220e-4102-b269-9c87aa525bda?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.821065"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 09:57:10.821065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.824946"], ["updated_at", "2014-10-13 09:57:10.824946"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "9bceb208-16cd-43f0-b8a4-b9a77b4cd56e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 697]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.0ms Sent mail to test.user@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1f6cb59d_eaba3fdbecc65be416544@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/9bceb208-16cd-43f0-b8a4-b9a77b4cd56e?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.841570"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 09:57:10.841570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.848098"], ["updated_at", "2014-10-13 09:57:10.848098"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "4a7c8bab-26d1-4c40-9c3c-cb10f999b503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 698]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 13.4ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1f6d15ef_eaba3fdbecc65be4166f7@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/4a7c8bab-26d1-4c40-9c3c-cb10f999b503?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.865965"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 09:57:10.865965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.870018"], ["updated_at", "2014-10-13 09:57:10.870018"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "6e03ec7f-8875-487d-a601-4799dd9f36d8"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 699]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.3ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1f6d66d7_eaba3fdbecc65be41673a@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/6e03ec7f-8875-487d-a601-4799dd9f36d8?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.888161"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 09:57:10.888161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.892216"], ["updated_at", "2014-10-13 09:57:10.892216"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "78c4a6b1-1eed-4c17-9392-5b86b5a90337"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 700]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.4ms Sent mail to test.user@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 10:57:10 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543ba1f6dbd8a_eaba3fdbecc65be4168e@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/78c4a6b1-1eed-4c17-9392-5b86b5a90337?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.909166"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 09:57:10.909166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0112' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.912815"], ["slug", "surname-0112"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 09:57:10.912815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0113", "image"=>"#"}, "id"=>"surname-0112"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 701]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0112' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (702) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0113' AND "people"."given_name" IS NULL AND ("people"."id" != 702) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 702]] SQL (0.2ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 702 [["image", nil], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 09:57:10.922179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0112/image/edit Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.928162"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 09:57:10.928162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.931455"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:57:10.931455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.934333"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:57:10.934333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 703]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (705) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 705) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.959480"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 09:57:10.959480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0116' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.962841"], ["slug", "surname-0116"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 09:57:10.962841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0117", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0116"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 706]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (707) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0117' AND "people"."given_name" IS NULL AND ("people"."id" != 707) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 707 [["surname", "Surname-0117"], ["updated_at", "2014-10-13 09:57:10.972293"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0116 Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 707]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.979359"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 09:57:10.979359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0119' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:10.982758"], ["slug", "surname-0119"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 09:57:10.982758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0120", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 708]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (709) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0120' AND "people"."given_name" IS NULL AND ("people"."id" != 709) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 709 [["surname", "Surname-0120"], ["updated_at", "2014-10-13 09:57:10.991327"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0119 Completed 302 Found in 8ms (ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:10.996721"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 09:57:10.996721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0122' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.000181"], ["slug", "surname-0122"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 09:57:11.000181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0123", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0122"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 710]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0122' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (711) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0123' AND "people"."given_name" IS NULL AND ("people"."id" != 711) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 711 [["surname", "Surname-0123"], ["updated_at", "2014-10-13 09:57:11.009453"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0122 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.015245"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 09:57:11.015245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0125' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.018686"], ["slug", "surname-0125"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 09:57:11.018686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0125"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 712]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0125' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (713) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.029642"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 09:57:11.029642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0127' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.032758"], ["slug", "surname-0127"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 09:57:11.032758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0127"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 714]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0127' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (715) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.044241"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 09:57:11.044241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0129' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.047594"], ["slug", "surname-0129"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 09:57:11.047594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0129"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 716]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0129' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (717) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.058981"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 09:57:11.058981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0131' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.061958"], ["slug", "surname-0131"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 09:57:11.061958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0131"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 718]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0131' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (719) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.074964"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.074964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 533]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 533]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 533]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0056-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "533"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.080010"], ["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.080010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.084957"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 09:57:11.084957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0133' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.088392"], ["slug", "surname-0133"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 09:57:11.088392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0133"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 720]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0133' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (721) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.102314"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.102314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 535]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0057-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "535"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.107247"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.107247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.111784"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 09:57:11.111784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0135' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.115006"], ["slug", "surname-0135"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 09:57:11.115006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0135"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 722]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0135' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (723) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.126134"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 09:57:11.126134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0137' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.129361"], ["slug", "surname-0137"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 09:57:11.129361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.136393"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.136393"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 537]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 537]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 537]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "537"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.141218"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.141218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.142765"], ["group_id", 538], ["person_id", 725], ["updated_at", "2014-10-13 09:57:11.142765"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 725]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:11.144160' WHERE "people"."id" = 725 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:11.144844' WHERE "groups"."id" = 538  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0137"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 724]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0137' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (725) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.155931"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 09:57:11.155931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0139' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.159282"], ["slug", "surname-0139"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 09:57:11.159282"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0139"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 726]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0139' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (727) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.170292"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 09:57:11.170292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0141", "image"=>"#"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 728]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0141' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0141' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.176643"], ["image", nil], ["slug", "surname-0141"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 09:57:11.176643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0141/image/edit Completed 302 Found in 5ms (ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.182293"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 09:57:11.182293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.185246"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 09:57:11.185246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 730]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.195556"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 09:57:11.195556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0144"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 732]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0144' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0144' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.202355"], ["slug", "surname-0144"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 09:57:11.202355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0144 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.207130"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 09:57:11.207130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0146"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 734]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0146' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0146' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.213110"], ["slug", "surname-0146"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 09:57:11.213110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0146 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.218111"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 09:57:11.218111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0148"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 736]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0148' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0148' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.224418"], ["slug", "surname-0148"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 09:57:11.224418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0148 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.230432"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 09:57:11.230432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 738]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.239364"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 09:57:11.239364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 739]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.248590"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 09:57:11.248590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 740]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.256674"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 09:57:11.256674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 741]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.268128"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.268128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 539]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 539]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 539]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "539"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.273601"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.273601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.278306"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 09:57:11.278306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0154' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.281832"], ["slug", "surname-0154"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 09:57:11.281832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0154"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 742]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0154' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (743) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.292364"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 09:57:11.292364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 744]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.299220"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 09:57:11.299220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 745]] Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.309456"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 09:57:11.309456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 746]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.320518"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.320518"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 541]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 541]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 541]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "541"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.325666"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.325666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.330682"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 09:57:11.330682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0159' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.333246"], ["slug", "surname-0159"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 09:57:11.333246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0159"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 747]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0159' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (748) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.348074"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.348074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 543]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 543]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 543]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "543"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.365379"], ["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.365379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.369873"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 09:57:11.369873"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0161' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.372250"], ["slug", "surname-0161"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 09:57:11.372250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0161"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 749]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0161' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (750) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.382260"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 09:57:11.382260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 751]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.393065"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.393065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 545]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 545]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 545]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "545"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.397938"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.397938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.403068"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 09:57:11.403068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 752]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.409744"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 09:57:11.409744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 753]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.414588"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 09:57:11.414588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0166' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.417730"], ["slug", "surname-0166"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 09:57:11.417730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0166"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 754]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0166' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (755) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 755]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.429309"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 09:57:11.429309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0168' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.432719"], ["slug", "surname-0168"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 09:57:11.432719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0168"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 756]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (757) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 757]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.443582"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 09:57:11.443582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0170' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:11.446644"], ["slug", "surname-0170"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 09:57:11.446644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0170"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 758]] Peoplefinder::Person Load (0.9ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0170' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (759) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 759]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:11.464910"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:11.464910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 760]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 760]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 760]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (760) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.9ms | ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 760]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (760) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 760]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (760) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 760]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 760]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:11.606894"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:11.606894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 761]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (761) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.656957"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.656957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 547]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 547]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 547]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "547"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.662672"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.662672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (548) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (547, 548) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 548]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '547/548' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '547/548' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 548]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 2.2ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.7ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"548", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 548]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 548]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 548]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 548]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "547/548"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:11.728601"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:57:11.728601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 761]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (549) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (547, 548, 549) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 549]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '547/548/549' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '547/548/549' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 549]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 548]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:11.762307"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:11.762307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 762]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 762]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 762]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (762) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.814791"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.814791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "550"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.820529"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.820529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0063/edit" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0063"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 762]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0063' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (551) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (550, 551) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 550]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (550) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '550/551' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.2ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:11.861904"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.861904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 552]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 552]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 552]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "552"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:11.867164"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:11.867164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:11 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:12.304380"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:12.304380"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 763]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (763) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"553", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 553]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 553]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 553]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 553]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "552/553"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:12.544606"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:57:12.544606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (554) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (552, 553, 554) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 554]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '552/553/554' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '552/553/554' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 554]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:12.638882"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:12.638882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 764]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 18ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 764]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (764) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.7ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0171' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:12.700877"], ["slug", "surname-0171"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 09:57:12.700877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:12.708318"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:12.708318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0064' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "555"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:12.713657"], ["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:12.713657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:12.715044"], ["group_id", 556], ["person_id", 765], ["updated_at", "2014-10-13 09:57:12.715044"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:12.715680' WHERE "people"."id" = 765 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:12.716313' WHERE "groups"."id" = 556  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0064/edit" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0064"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 764]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0064' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (556) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (555, 556) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 555]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (555) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '555/556' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:12.756106"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:12.756106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 766]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 766]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (766) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.0ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:12.807516"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:12.807516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "557"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:12.812394"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:12.812394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0065/edit" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0065"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (558) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (557, 558) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (557) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '557/558' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.0ms | ActiveRecord: 2.4ms) Started DELETE "/teams/group-0065" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0065"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (558) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 557]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '557/558/%' OR "groups"."ancestry" = '557/558')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '557/558' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 558]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (557) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (557) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 557]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '557' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '557' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 557]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 558]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:12.884687"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:12.884687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 767]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 767]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 767]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (767) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 767]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:12.966011"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:12.966011"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:13.404974"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:13.404974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 768]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (768) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (559) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (559) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 559]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '559' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '559' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 559]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.7ms | ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 24ms (Views: 19.4ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"559", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 559]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 559]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 559]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 559]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "559"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:13.687571"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:57:13.687571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/teams/csg Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (560) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (559, 560) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 560]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '559/560' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '559/560' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 560]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.8ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 559]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:13.778236"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:13.778236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 769]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 769]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 769]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (769) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 32.2ms | ActiveRecord: 1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:13.829824"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:13.829824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 561]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 561]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 561]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "561"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:13.835124"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:13.835124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 561]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 769]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (561) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (561) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '561' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '561' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 23ms (Views: 16.6ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:13.874807"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:13.874807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 563]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 563]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 563]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "563"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:13.882814"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:13.882814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "563/564"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:13.889498"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:13.889498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:13 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:14.325126"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:14.325126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 770]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (770) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (13.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 44.4ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (565) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (563, 564, 565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 565]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '563/564/565' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '563/564/565' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 565]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.1ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (565) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (563, 564, 565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (563, 564) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '563/564/565' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.9ms | ActiveRecord: 2.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"564", "team_email_address"=>"example.user.224@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (565) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 565) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 565) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 565 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 09:57:14.679384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/teams/cyberdigital-cyberservices Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (565) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (563, 564, 565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 565]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '563/564/565' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '563/564/565' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 565]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 565]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 564]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:14.772959"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:14.772959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 771]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (771) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:14.845323"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:57:14.845323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (566) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (566) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 566]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '566' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '566' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 566]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 2.0ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 771]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (566) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (566) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '566' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '566' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.9ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:14.907451"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:14.907451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 772]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 772]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 772]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (772) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (9.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.0ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 772]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 16ms (Views: 13.2ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 772]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:14.995708"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 09:57:14.995708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:57:14 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 772]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (567) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (567) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 567]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (4.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '567' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '567' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 567]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.7ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:15.035550"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:15.035550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "568"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:15.041130"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:15.041130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "568/569"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:15.046432"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:15.046432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:15.483546"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:15.483546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 773]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (773) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (570) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (568, 569, 570) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '568/569/570' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '568/569/570' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.3ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (570) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (568, 569, 570) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 569]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (568, 569) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '568/569/570' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.5ms | ActiveRecord: 2.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"568", "team_email_address"=>"example.user.227@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (570) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 570) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 570) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '568/569/570/%' OR "groups"."ancestry" = '568/569/570')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 570 [["ancestry", "568"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 09:57:15.834121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 3.0ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 773]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (570) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (568, 570) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '568/570' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '568/570' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 570]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 568]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:15.928026"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:15.928026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 774]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (774) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 46.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:15.992087"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:15.992087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 571]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 571]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 571]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0067-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0067' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "571"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:15.997404"], ["name", "Group-0067"], ["slug", "group-0067"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:15.997404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0172' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:16.000151"], ["slug", "surname-0172"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 09:57:16.000151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:16.002611"], ["group_id", 572], ["person_id", 775], ["updated_at", "2014-10-13 09:57:16.002611"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 775]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:16.004085' WHERE "people"."id" = 775 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:16.004793' WHERE "groups"."id" = 572  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0172" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0172"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (775) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (571, 572) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (571, 572) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.3ms) Started GET "/people/surname-0172/reported_profiles/new" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.6ms) Started POST "/people/surname-0172/reported_profiles" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0172"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 775]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 774], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.228@digital.justice.gov.uk"], ["subject_id", 775]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.0ms Sent mail to example.user.228@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 10:57:16 +0100 From: support@example.com To: example.user.228@digital.justice.gov.uk Message-ID: <543ba1fceb5c_eaba3fdbecc65be4169eb@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0172 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0172 Redirected to http://www.example.com/people/surname-0172 Completed 302 Found in 17ms (ActiveRecord: 1.2ms) Started GET "/people/surname-0172" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 774]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (775) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (571, 572) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (571, 572) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:16.096267"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:16.096267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 776]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (776) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 30.8ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:16.203585"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:16.203585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 14ms (ActiveRecord: 1.4ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 0.6ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (777) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 776]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (777) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.6ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:16.305205"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:16.305205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 778]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (778) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0173' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:16.355523"], ["slug", "surname-0173"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 09:57:16.355523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0173/edit" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0173"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0173' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (779) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.1ms) Started DELETE "/people/surname-0173" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0173"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0173' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (779) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 779]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 778]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 779]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:16.440281"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:16.440281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 573]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 573]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 573]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "573"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:16.446020"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:16.446020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:16.450230"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:16.450230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:16.893256"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:16.893256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 781]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (781) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 39.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"574", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 780]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 12.5ms | ActiveRecord: 1.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"574"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413194237-60090-1195/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 09:57:17.309647"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:17.309647"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:17.310786"], ["group_id", 574], ["person_id", 782], ["role", ""], ["updated_at", "2014-10-13 09:57:17.310786"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 782]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:17.312435' WHERE "people"."id" = 782 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 574]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:17.314347' WHERE "groups"."id" = 574  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527/image/edit Completed 302 Found in 17ms (ActiveRecord: 2.0ms) Started GET "/people/marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527/image/edit" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.7ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started PUT "/people/marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527/image" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:63305/people/marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527?cache_bust=1413194237 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) Started GET "/people/marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527?cache_bust=1413194237" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413194237", "id"=>"marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 781]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-98ea8014-acdd-4fe3-b388-50ee28d42527' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (782) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (573, 574) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (573, 574) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 1.5ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:17.527723"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:17.527723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 783]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (783) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:17.577154"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:17.577154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.5ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 784]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 4ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 783]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (19.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 24.7ms | ActiveRecord: 0.2ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:17.689688"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:17.689688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 785]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 785]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 785]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (785) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 34.9ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 785]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:17.785229"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:17.785229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 786]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 786]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 786]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (786) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.4ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0174' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:17.834167"], ["slug", "surname-0174"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 09:57:17.834167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0174/edit" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0174"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 786]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0174' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (787) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:17.887542"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:17.887542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 788]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (788) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 37.3ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:17.939580"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:17.939580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:17.942768"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 09:57:17.942768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 10:57:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (790) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (790) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 790) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 789]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.0ms | ActiveRecord: 1.7ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (790) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 790 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:18.037839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 788]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (790) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:18.072311"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:18.072311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 575]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 575]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 575]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "575"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:18.077841"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:18.077841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0175' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:18.080678"], ["slug", "surname-0175"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 09:57:18.080678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:18.517639"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:18.517639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 792]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (792) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0175/edit" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0175"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0175' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (791) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.9ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0175" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0175", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"575", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0175"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0175' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (791) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0175' AND "people"."given_name" = '' AND ("people"."id" != 791) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.3ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 791 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:57:18.832897"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:18.834750"], ["group_id", 575], ["person_id", 791], ["role", ""], ["updated_at", "2014-10-13 09:57:18.834750"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 791]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:18.836549' WHERE "people"."id" = 791 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 575]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:18.838298' WHERE "groups"."id" = 575  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/surname-0175 Completed 302 Found in 17ms (ActiveRecord: 3.1ms) Started GET "/people/surname-0175" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0175"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0175' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (791) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (575) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (575) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (10.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 23.4ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0175/edit" for 127.0.0.1 at 2014-10-13 10:57:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0175"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0175' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (791) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (575) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (575) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 791]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.4ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 792]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:19.068748"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:19.068748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 793]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 793]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 793]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (793) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 793]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 34.4ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 793]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 26.8ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:19.205830"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:19.205830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 794]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (794) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.1ms | ActiveRecord: 1.3ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:19.259181"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:19.259181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (795) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (795) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (795) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 795) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 795 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:19.349873"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 14ms (ActiveRecord: 1.9ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 794]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (795) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.9ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:19.384046"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:19.384046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 796]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (796) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.5ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.5ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:57:19.482970"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:19.482970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (797) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 796]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (797) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.0ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:19.571682"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:19.571682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 798]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 798]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 798]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (798) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 09:57:19.623951"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:19.623951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 798]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (799) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.2ms | ActiveRecord: 0.9ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 798]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (799) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 798]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (799) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 33.2ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:19.754698"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:19.754698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 577]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 577]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 577]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "577"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:19.759687"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:19.759687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:19 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:20.200633"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:20.200633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 800]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (800) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.2ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.5ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"578", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 09:57:20.544369"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:20.544369"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:20.545492"], ["group_id", 578], ["person_id", 801], ["role", ""], ["updated_at", "2014-10-13 09:57:20.545492"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 801]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:20.546982' WHERE "people"."id" = 801 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 578]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:20.548430' WHERE "groups"."id" = 578  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/marco-polo/image/edit Completed 302 Found in 19ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:63305/people/marco-polo?cache_bust=1413194240 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413194240" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413194240", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 800]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (801) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (577, 578) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (577, 578) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 18ms (Views: 11.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:20.750304"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:20.750304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 802]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 802]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 802]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (802) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0176' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:20.797975"], ["slug", "surname-0176"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 09:57:20.797975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:20.804998"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:20.804998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 579]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 579]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 579]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0068-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0068' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0068' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "579"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:20.809791"], ["name", "Group-0068"], ["slug", "group-0068"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:20.809791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:20.811091"], ["group_id", 580], ["person_id", 803], ["updated_at", "2014-10-13 09:57:20.811091"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:20.812100' WHERE "people"."id" = 803 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:20.813355' WHERE "groups"."id" = 580  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0176/edit" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0176"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 802]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (803) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (579, 580) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (579, 580) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 803]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 48.3ms | ActiveRecord: 1.9ms) Started DELETE "/people/surname-0176" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0176"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 802]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (803) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 118]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 803]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:20.883355' WHERE "people"."id" = 803 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:20.884119' WHERE "groups"."id" = 580 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 803]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 802]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 118]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 803]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:20.905872"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:20.905872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 804]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 804]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 804]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (804) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:20.956907"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 09:57:20.956907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 805]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 805 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:20.962076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:20.972697"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:20.972697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 581]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 581]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 581]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0069-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0069' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "581"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:20.977949"], ["name", "Group-0069"], ["slug", "group-0069"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:20.977949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:20.980091"], ["group_id", 582], ["person_id", 805], ["updated_at", "2014-10-13 09:57:20.980091"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 805]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:20.981439' WHERE "people"."id" = 805 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:20.982111' WHERE "groups"."id" = 582  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:57:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 804]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (805) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (581, 582) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (581, 582) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.2ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.012287"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.012287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 806]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 806]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 806]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (806) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.061558"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 09:57:21.061558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 807 [["email", nil], ["updated_at", "2014-10-13 09:57:21.063040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 806]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (807) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.091592"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.091592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 808]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (808) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.138263"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 09:57:21.138263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (809) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 8.8ms | ActiveRecord: 1.1ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.7ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 809], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:21.194556"], ["updated_at", "2014-10-13 09:57:21.194556"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "2185eda9-a6d1-4b92-b640-88d1771d6e11"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.6ms Sent mail to someone.else@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 10:57:21 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543ba2013162c_eaba3fdbecc65be4170dc@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/2185eda9-a6d1-4b92-b640-88d1771d6e11?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 19ms (ActiveRecord: 1.3ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 808]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (809) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.7ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.241494"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.241494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 810]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 810]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 810]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (810) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.287650"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-e2079e07-3d68-4f93-92ad-9cdb836dbd1d"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 09:57:21.287650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e2079e07-3d68-4f93-92ad-9cdb836dbd1d" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e2079e07-3d68-4f93-92ad-9cdb836dbd1d"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 810]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e2079e07-3d68-4f93-92ad-9cdb836dbd1d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (811) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 9.0ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.315868"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.315868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 812]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 812]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 812]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (812) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.364938"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-106374a7-ee7e-423d-8611-29b0ab020360"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 09:57:21.364938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 813]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 813 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 09:57:21.369699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.381006"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.381006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 583]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 583]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 583]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0070-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0070' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "583"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:21.386716"], ["name", "Group-0070"], ["slug", "group-0070"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.386716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:21.389166"], ["group_id", 584], ["person_id", 813], ["updated_at", "2014-10-13 09:57:21.389166"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 813]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:21.390730' WHERE "people"."id" = 813 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:21.392063' WHERE "groups"."id" = 584  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-106374a7-ee7e-423d-8611-29b0ab020360" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-106374a7-ee7e-423d-8611-29b0ab020360"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 812]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-106374a7-ee7e-423d-8611-29b0ab020360' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (813) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (583, 584) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (583, 584) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.9ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.440239"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.440239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 814]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 22ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (814) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.490324"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.490324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "585"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:21.495565"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.495565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (586) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (585, 586) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (585) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '585/586' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.5ms | ActiveRecord: 2.3ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (586) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 585]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '585/586/%' OR "groups"."ancestry" = '585/586')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '585/586' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 586]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.535411"], ["event", "destroy"], ["item_id", 586], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 586\nname: original name\ncreated_at: 2014-10-13 09:57:21.495565000 Z\nupdated_at: 2014-10-13 09:57:21.495565000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '585'\nancestry_depth: 1\nteam_email_address: example.user.242@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 586], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 12ms (ActiveRecord: 2.7ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (585) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (585) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 585]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '585' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '585' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 585]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.5ms | ActiveRecord: 2.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 814]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 586]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 20ms (Views: 17.5ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.593827"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.593827"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 815]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (815) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:21.646218"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.646218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "587"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:21.651221"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:21.651221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (588) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (587, 588) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (587) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '587/588' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.4ms | ActiveRecord: 2.5ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"587", "team_email_address"=>"example.user.244@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (588) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 587]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 588) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 588) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 588 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 09:57:21.701022"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:21.704637"], ["event", "update"], ["item_id", 588], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 588\nname: original name\ncreated_at: 2014-10-13 09:57:21.651221000 Z\nupdated_at: 2014-10-13 09:57:21.651221000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '587'\nancestry_depth: 1\nteam_email_address: example.user.244@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 18ms (ActiveRecord: 3.3ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (588) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (587, 588) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '587/588' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '587/588' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 23.3ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 815]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.763252"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.763252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 816]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (816) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.2ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 12.9ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:21.837797"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 09:57:21.837797"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.839853"], ["event", "create"], ["item_id", 589], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (589) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (589) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 589]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '589' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '589' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 589]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.5ms | ActiveRecord: 2.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 816]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 589]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.887129"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:21.887129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 817]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (817) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 09:57:21.985059"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 09:57:21.985059"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:21.995622"], ["event", "create"], ["item_id", 818], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 20ms (ActiveRecord: 1.3ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 10:57:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (818) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 818]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.3ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/63" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"63"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 63]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 818]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 818]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 818]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.040127"], ["event", "destroy"], ["item_id", 818], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 818\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 09:57:21.985059000 Z\nupdated_at: 2014-10-13 09:57:21.985059000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 818], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 817]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 818]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 818]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.064073"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:22.064073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 819]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (819) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.112025"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 09:57:22.112025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (820) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (820) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 820]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.166376"], ["event", "destroy"], ["item_id", 820], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 820\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:57:22.112025000 Z\nupdated_at: 2014-10-13 09:57:22.112025000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 820], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 820]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/65" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"65"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 65]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 820]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 820) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.112025"], ["given_name", "Greg"], ["id", 820], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 09:57:22.211030"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.213322"], ["event", "create"], ["item_id", 820], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 819]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 820]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 820]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.239874"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:22.239874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 821]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (821) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 32.3ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.301035"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:22.301035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 590]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 590]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 590]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "590"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:22.305971"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:22.305971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:22.308475"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:57:22.308475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.310395"], ["group_id", 591], ["leader", "t"], ["person_id", 822], ["role", "Jefe"], ["updated_at", "2014-10-13 09:57:22.310395"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 822]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:22.311846' WHERE "people"."id" = 822 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:22.312563' WHERE "groups"."id" = 591  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (822) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (590, 591) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (590, 591) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 822]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.5ms | ActiveRecord: 1.7ms) Started DELETE "/memberships/121?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"121"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 121]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 121]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.368277"], ["event", "destroy"], ["item_id", 121], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 121\ngroup_id: 591\nperson_id: 822\nrole: Jefe\ncreated_at: 2014-10-13 09:57:22.310395000 Z\nupdated_at: 2014-10-13 09:57:22.310395000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.1ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 121], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 822]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:22.370946' WHERE "people"."id" = 822 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 591]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:22.372408' WHERE "groups"."id" = 591  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 9ms (ActiveRecord: 2.1ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (822) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 821]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 121]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 822]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 591]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:22.441390"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:22.441390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 823]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (823) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:22.489766"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 09:57:22.489766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (824) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 50.6ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (824) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 824) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 824 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 09:57:22.567478"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:22.571334"], ["event", "update"], ["item_id", 824], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 824\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:57:22.489766000 Z\nupdated_at: 2014-10-13 09:57:22.489766000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 15ms (ActiveRecord: 2.3ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (824) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 824]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 0.9ms) Started POST "/audit_trail/undo/68" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"68"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 68]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 824]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 824) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 824 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 09:57:22.614819"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:22.618157"], ["event", "update"], ["item_id", 824], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 824\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 09:57:22.489766000 Z\nupdated_at: 2014-10-13 09:57:22.567478000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 823]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 824]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 824]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 12ms (Views: 10.4ms | ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 824]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.648129"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:22.648129"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.650188"], ["event", "create"], ["item_id", 592], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.249@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 592]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 592]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 592]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "592"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:22.654872"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:22.654872"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.656791"], ["event", "create"], ["item_id", 593], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.248@digital.justice.gov.uk\nancestry:\n- \n- '592'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:22.661300"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 09:57:22.661300"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:22.663465"], ["event", "create"], ["item_id", 825], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63305/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 10:57:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:23.099696"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:23.099696"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:23.102039"], ["event", "create"], ["item_id", 826], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 826]] Redirected to http://127.0.0.1:63305/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (826) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (825) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.2ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"593", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (825) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 825) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 825 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:57:23.385448"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:23.389177"], ["event", "update"], ["item_id", 825], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 825\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 09:57:22.661300000 Z\nupdated_at: 2014-10-13 09:57:22.661300000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.390087"], ["group_id", 593], ["person_id", 825], ["role", "Jefe"], ["updated_at", "2014-10-13 09:57:23.390087"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:23.391741"], ["event", "create"], ["item_id", 122], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 593\nperson_id:\n- \n- 825\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 825]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.393195' WHERE "people"."id" = 825 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 593]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.394567' WHERE "groups"."id" = 593  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63305/people/bob Completed 302 Found in 22ms (ActiveRecord: 3.4ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (825) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (592, 593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (592, 593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.2ms | ActiveRecord: 1.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 122]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 825]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 593]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.9ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 825]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 826]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 825]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 593]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 592]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 15.7ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 09:57:23.571591"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 09:57:23.571591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 827]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (827) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0182' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.618322"], ["slug", "surname-0182"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 09:57:23.618322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0182/edit" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0182"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0182' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (828) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.2ms) Started PATCH "/people/surname-0182" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0182", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0182"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0182' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (828) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0182' AND "people"."given_name" = '' AND ("people"."id" != 828) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 828]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 828 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 09:57:23.683012"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 09:57:23.692403"], ["event", "update"], ["item_id", 828], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 828\ngiven_name: \nsurname: Surname-0182\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 09:57:23.618322000 Z\nupdated_at: 2014-10-13 09:57:23.618322000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 828\n given_name: ''\n surname: Surname-0182\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 09:57:23.683012000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0182\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 828\n given_name: ''\n surname: Surname-0182\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 09:57:23.618322000 Z\n updated_at: &2 2014-10-13 09:57:23.683012000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0182\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 828\n given_name: ''\n surname: Surname-0182\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0182\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70213899328240\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 828\n given_name: ''\n surname: Surname-0182\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0182\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413194243-60090-1912\n cache_id: 1413194243-60090-1912\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413194243-60090-1912/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70213899324540\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 828\n given_name: ''\n surname: Surname-0182\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0182\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413194243-60090-1912\n cache_id: 1413194243-60090-1912\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413194243-60090-1912/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413194243-60090-1912\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413194243-60090-1912/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0182/image/edit Completed 302 Found in 26ms (ActiveRecord: 2.9ms) Started GET "/people/surname-0182/image/edit" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0182"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0182' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 10:57:23 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 827]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.4ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 828]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.732533"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.732533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (594) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.737546"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.737546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 595]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 595]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 595]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "595"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.743381"], ["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.743381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 596]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 596]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 596]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "595/596"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:23.759714"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.759714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 597]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 597]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 597]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "595/596/597"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:23.765089"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.765089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (595, 596, 597, 598) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.779567"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.779567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 599]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "599"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.785276"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.785276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.793414"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.793414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 601]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 601]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 601]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0077-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "601"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.798003"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.798003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 602]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 602]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 602]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "601/602"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:23.803984"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.803984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 603]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 603]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 603]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "601/602/603"], ["ancestry_depth", 3], ["created_at", "2014-10-13 09:57:23.810579"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.810579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0077' AND "groups"."id" != 602) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.820735"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.820735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.827384"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.827384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '606'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.835532"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.835532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 607]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 607]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 607]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "607"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.840898"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.840898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 607]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '607'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.849828"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.849828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 609]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 609]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 609]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0081-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "609"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.854384"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.854384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.857548"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:57:23.857548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.859549"], ["group_id", 610], ["person_id", 829], ["updated_at", "2014-10-13 09:57:23.859549"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.860212' WHERE "people"."id" = 829 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 610]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.861607' WHERE "groups"."id" = 610  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 610 OR "groups"."ancestry" ILIKE '609/610/%') OR "groups"."ancestry" = '609/610')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (610) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.871125"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.871125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 611]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 611]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 611]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "611"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.877602"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.877602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.881878"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:57:23.881878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.884043"], ["group_id", 612], ["person_id", 830], ["updated_at", "2014-10-13 09:57:23.884043"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.884740' WHERE "people"."id" = 830 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 612]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.886042' WHERE "groups"."id" = 612  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 612]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 612]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 612]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "611/612"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:23.891111"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.891111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.894316"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:57:23.894316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.896348"], ["group_id", 613], ["person_id", 831], ["updated_at", "2014-10-13 09:57:23.896348"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.897040' WHERE "people"."id" = 831 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 613]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.898407' WHERE "groups"."id" = 613  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 612 OR "groups"."ancestry" ILIKE '611/612/%') OR "groups"."ancestry" = '611/612')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (612,613) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.911749"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.911749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 614]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 614]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 614]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "614"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.918856"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.918856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.922349"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:57:23.922349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.924308"], ["group_id", 615], ["person_id", 832], ["updated_at", "2014-10-13 09:57:23.924308"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.924965' WHERE "people"."id" = 832 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 615]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.926381' WHERE "groups"."id" = 615  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 615]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 615]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 615]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "614/615"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:23.931529"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.931529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.934741"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:57:23.934741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.936858"], ["group_id", 616], ["person_id", 833], ["updated_at", "2014-10-13 09:57:23.936858"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.937560' WHERE "people"."id" = 833 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 616]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.939174' WHERE "groups"."id" = 616  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.940905"], ["group_id", 616], ["person_id", 833], ["updated_at", "2014-10-13 09:57:23.940905"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.941622' WHERE "people"."id" = 833 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 616]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.942935' WHERE "groups"."id" = 616  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 615 OR "groups"."ancestry" ILIKE '614/615/%') OR "groups"."ancestry" = '614/615')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (615,616) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.952549"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.952549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 617]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "617"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.957319"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.957319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.960780"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 09:57:23.960780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.962767"], ["group_id", 618], ["person_id", 834], ["updated_at", "2014-10-13 09:57:23.962767"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.963549' WHERE "people"."id" = 834 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 618]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.964934' WHERE "groups"."id" = 618  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 618]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 618]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 618]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "617/618"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:23.970181"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.970181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.973342"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 09:57:23.973342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.975368"], ["group_id", 619], ["person_id", 835], ["updated_at", "2014-10-13 09:57:23.975368"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.976056' WHERE "people"."id" = 835 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 619]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.977424' WHERE "groups"."id" = 619  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:23.979350"], ["group_id", 619], ["person_id", 835], ["updated_at", "2014-10-13 09:57:23.979350"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:23.980130' WHERE "people"."id" = 835 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 619]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:23.981911' WHERE "groups"."id" = 619  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 618 OR "groups"."ancestry" ILIKE '617/618/%') OR "groups"."ancestry" = '617/618')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (618,619) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:23.991259"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.991259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 620]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 620]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 620]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "620"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:23.996961"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:23.996961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0183' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:24.000618"], ["slug", "surname-0183"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 09:57:24.000618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.002211"], ["group_id", 621], ["leader", "t"], ["person_id", 836], ["updated_at", "2014-10-13 09:57:24.002211"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:24.003160' WHERE "people"."id" = 836 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:24.003890' WHERE "groups"."id" = 621  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 621]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.012372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.012372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 622]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 622]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 622]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "622"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.016772"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.016772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0184' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:24.020176"], ["slug", "surname-0184"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 09:57:24.020176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:24.021788"], ["group_id", 623], ["person_id", 837], ["updated_at", "2014-10-13 09:57:24.021788"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:24.022457' WHERE "people"."id" = 837 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 623]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:24.023764' WHERE "groups"."id" = 623  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '622/623' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 623]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.038238"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.038238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 624]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 624]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 624]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "624"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.045215"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.045215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '624/625' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 625]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.057649"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.057649"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 626]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 626]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "626"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.063188"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.063188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0185' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:24.066764"], ["slug", "surname-0185"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 09:57:24.066764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 09:57:24.068360"], ["group_id", 627], ["person_id", 838], ["updated_at", "2014-10-13 09:57:24.068360"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 09:57:24.069060' WHERE "people"."id" = 838 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 627]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 09:57:24.070834' WHERE "groups"."id" = 627  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '626/627' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 627]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.082926"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.082926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 628]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 628]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "628"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.089579"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.089579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 629]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 629]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 629]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "628/629"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:24.094819"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.094819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 629]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '628/629' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.103357"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.103357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 631]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 631]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 631]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "631"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.107858"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.107858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '631/632/%' OR "groups"."ancestry" = '631/632')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 632]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 632]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.118648"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.118648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 633]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 633]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 633]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "633"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.123502"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.123502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '633/634/%' OR "groups"."ancestry" = '633/634'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.133141"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.133141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "635"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.151149"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.151149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 635) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 635 [["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.154595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 635]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "635"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.160092"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.160092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.167796"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.167796"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "638"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.172383"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.172383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 638) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 638 [["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.175556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "638"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.180868"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.180868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 638) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 638 [["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.184054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 638]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "638"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.190306"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.190306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.198761"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.198761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 642]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 642]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 642]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "642"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.203463"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.203463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.210690"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.210690"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "644"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.215558"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.215558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 644]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 645) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 645) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 645 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 09:57:24.220962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 645]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.228914"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.228914"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 646]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 646]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 646]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "646"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.233274"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.233274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '646/647' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.241371"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.241371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 648]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 648]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 648]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "648"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.246789"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.246789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '648/649' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.254823"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.254823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "650"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.259785"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.259785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 650]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.268410"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.268410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 09:57:24.285030"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.285030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 653]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 653]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 653]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "653"], ["ancestry_depth", 1], ["created_at", "2014-10-13 09:57:24.290052"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.290052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 654]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 654]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 654]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "653/654"], ["ancestry_depth", 2], ["created_at", "2014-10-13 09:57:24.295791"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 09:57:24.295791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.5ms)  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN Peoplefinder::Group Load (1.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:38:13.835686"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.835686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 656]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 656]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 656]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "656"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:38:13.844146"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.844146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "656/657"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.849281"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.849281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "656/657/658"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.854160"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.854160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 658]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "656/657/658"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.858788"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.858788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "656/657"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.863519"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.863519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 657]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:38:13.874386"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.874386"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 662]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 662]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 662]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "662"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:38:13.878861"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.878861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "662/663"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.883595"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.883595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "662/663/664"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.888696"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.888696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 664]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "662/663/664"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.894361"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.894361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 663]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "662/663"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.899120"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.899120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 663 OR "groups"."ancestry" ILIKE '662/663/%') OR "groups"."ancestry" = '662/663')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:38:13.908704"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.908704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 668]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 668]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 668]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "668"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:38:13.913404"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.913404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "668/669"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.917799"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.917799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "668/669/670"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.922177"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.922177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 670]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "668/669/670"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:38:13.926689"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.926689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 669]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "668/669"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:38:13.932984"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:38:13.932984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 669 OR "groups"."ancestry" ILIKE '668/669/%') OR "groups"."ancestry" = '668/669')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN Peoplefinder::Group Load (0.9ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:40:40.661310"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.661310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 674]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 674]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 674]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "674"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:40:40.668917"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.668917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "674/675"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.673987"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.673987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "674/675/676"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.678600"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.678600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 676]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "674/675/676"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.683206"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.683206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "674/675"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.687867"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.687867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 675]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:40:40.697449"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.697449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 680]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 680]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 680]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "680"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:40:40.701873"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.701873"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "680/681"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.706490"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.706490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "680/681/682"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.711036"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.711036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 682]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "680/681/682"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.715615"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.715615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 681]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "680/681"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.720219"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.720219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 681 OR "groups"."ancestry" ILIKE '680/681/%') OR "groups"."ancestry" = '680/681')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:40:40.729605"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.729605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 686]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 686]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 686]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "686"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:40:40.734199"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.734199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "686/687"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.739146"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.739146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "686/687/688"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.743982"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.743982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 688]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "686/687/688"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:40:40.748634"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.748634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 687]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "686/687"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:40:40.753246"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:40:40.753246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 687 OR "groups"."ancestry" ILIKE '686/687/%') OR "groups"."ancestry" = '686/687')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:43:28.075344"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.075344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 692]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "692"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:43:28.082783"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.082783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "692/693"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.087868"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.087868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "692/693/694"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.092507"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.092507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 694]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "692/693/694"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.097040"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.097040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "692/693"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.101674"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.101674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 693]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:43:28.111425"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.111425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 698]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 698]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 698]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "698"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:43:28.115945"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.115945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "698/699"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.120661"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.120661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "698/699/700"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.125262"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.125262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 700]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "698/699/700"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.129869"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.129869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 699]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "698/699"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.134456"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.134456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 699 OR "groups"."ancestry" ILIKE '698/699/%') OR "groups"."ancestry" = '698/699')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:43:28.143382"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.143382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 704]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 704]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 704]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "704"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:43:28.147922"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.147922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "704/705"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.152331"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.152331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "704/705/706"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.156918"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.156918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 706]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "704/705/706"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:43:28.161827"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.161827"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 705]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "704/705"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:43:28.166494"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:43:28.166494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 705 OR "groups"."ancestry" ILIKE '704/705/%') OR "groups"."ancestry" = '704/705')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN  (0.2ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.8ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.220060"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 10:47:35.220060"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.234184"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:35.234184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.248163"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 10:47:35.248163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.251936"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 10:47:35.251936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.286481"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:35.286481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 843]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 843]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 30ms (ActiveRecord: 4.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 843]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (843) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (13.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (71.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (83.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (76.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (33.3ms) Completed 200 OK in 230ms (Views: 208.3ms | ActiveRecord: 3.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 843]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (843) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.5ms) Completed 200 OK in 33ms (Views: 28.0ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 843]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (843) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 843]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 843]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.5ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.620481"], ["slug", "surname-0001"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 10:47:35.620481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.635798"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.635798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 710]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 710]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 710]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "710"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:35.641210"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.641210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.642662"], ["group_id", 711], ["person_id", 844], ["updated_at", "2014-10-13 10:47:35.642662"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:35.643705' WHERE "people"."id" = 844 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:35.644396' WHERE "groups"."id" = 711  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.653818"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 10:47:35.653818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.659885"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.659885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 712]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 712]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 712]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "712"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:35.664421"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.664421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.665649"], ["group_id", 713], ["person_id", 845], ["updated_at", "2014-10-13 10:47:35.665649"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:35.666300' WHERE "people"."id" = 845 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:35.666907' WHERE "groups"."id" = 713  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.675426"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 10:47:35.675426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.681601"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.681601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 714]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 714]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 714]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "714"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:35.685868"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.685868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.687193"], ["group_id", 715], ["person_id", 846], ["updated_at", "2014-10-13 10:47:35.687193"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:35.687920' WHERE "people"."id" = 846 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:35.688542' WHERE "groups"."id" = 715  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.697515"], ["updated_at", "2014-10-13 10:47:35.697515"], ["user_email", "example.user.7@digital.justice.gov.uk"], ["value", "7246ae5a-71b8-469c-9470-f4bac7a35eb6"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 52]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.705510"], ["updated_at", "2014-10-13 10:47:35.705510"], ["user_email", "example.user.8@digital.justice.gov.uk"], ["value", "31de4aa4-b56c-4e0c-a405-63a4d486e1d3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.714623"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 10:47:35.714623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.717789"], ["updated_at", "2014-10-13 10:47:35.717789"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "707f7313-4db8-4883-bad0-63c98ba7e908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.721460"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 10:47:35.721460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.723815"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 10:47:35.723815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"849"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 848]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '849' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 849]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/information_requests/new.html.haml within layouts/peoplefinder/application (0.2ms) Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.740481"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 10:47:35.740481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.743091"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 10:47:35.743091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"851"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 850]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '851' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 851]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.750507"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 10:47:35.750507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.752872"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 10:47:35.752872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"853"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 852]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '853' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 853]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.760167"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 10:47:35.760167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.762414"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 10:47:35.762414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"855"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 854]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '855' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 855]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 855], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.774116"], ["updated_at", "2014-10-13 10:47:35.774116"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "4082232b-3d94-4f28-b9aa-5966cb5eff7e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 18.3ms Sent mail to someone.else@digital.justice.gov.uk (7.8ms) Date: Mon, 13 Oct 2014 11:47:35 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543badc7c0ed6_f3c03fc408865be4143f6@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/4082232b-3d94-4f28-b9aa-5966cb5eff7e?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 32ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.800145"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 10:47:35.800145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.802569"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 10:47:35.802569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"857"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 856]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '857' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 857]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 857], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:35.810232"], ["updated_at", "2014-10-13 10:47:35.810232"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "df4a848a-1b4a-4e33-84b4-81e073871773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 7.9ms Sent mail to someone.else@digital.justice.gov.uk (4.5ms) Date: Mon, 13 Oct 2014 11:47:35 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543badc7c74b4_f3c03fc408865be41448@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/df4a848a-1b4a-4e33-84b4-81e073871773?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.824477"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 10:47:35.824477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.826860"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 10:47:35.826860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"859"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 858]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '859' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 859]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.900160"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:35.900160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 860]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 860]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 860]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (860) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:35.965848"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.965848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 716]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 716]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 716]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "716"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:35.970690"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:35.970690"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0004" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0004"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:35.989379"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:35.989379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0004 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0004" for 127.0.0.1 at 2014-10-13 11:47:35 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0004"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 861]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0004' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (717) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (716, 717) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 717]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (10.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '716/717' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '716/717' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 717]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 29.3ms | ActiveRecord: 3.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:36.038556"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:36.038556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 862]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (862) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.5ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:47:36.134990"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:36.134990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (863) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 12.7ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 862]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (863) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 33.9ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:36.226405"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:36.226405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 864]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (864) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:36.273678"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:36.273678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 718]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 718]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 718]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "718"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:36.278398"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:36.278398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:36.281078"], ["slug", "surname-0017"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 10:47:36.281078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:36.283584"], ["group_id", 719], ["person_id", 865], ["updated_at", "2014-10-13 10:47:36.283584"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 865]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:36.285185' WHERE "people"."id" = 865 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:36.285952' WHERE "groups"."id" = 719  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0017" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0017"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (865) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (718, 719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (718, 719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 1.5ms) Started GET "/people/surname-0017/reported_profiles/new" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0017"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 17.1ms | ActiveRecord: 2.1ms) Started POST "/people/surname-0017/reported_profiles" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0017"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 865]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 864], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.12@digital.justice.gov.uk"], ["subject_id", 865]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.7ms Sent mail to example.user.12@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 11:47:36 +0100 From: support@example.com To: example.user.12@digital.justice.gov.uk Message-ID: <543badc856266_f3c03fc408865be4145e5@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0017 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0017 Redirected to http://www.example.com/people/surname-0017 Completed 302 Found in 22ms (ActiveRecord: 1.5ms) Started GET "/people/surname-0017" for 127.0.0.1 at 2014-10-13 11:47:36 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0017"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (865) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (718, 719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (718, 719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:37.776918"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:37.776918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 720]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 720]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 720]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "720"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:37.782050"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:37.782050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:37.787227"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:37.787227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 7.2ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 11:47:37 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:38.277219"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:38.277219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 867]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (867) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 33.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"721", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 866]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 17.7ms | ActiveRecord: 1.4ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"721"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413197258-62400-6908/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 10:47:38.733213"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:38.733213"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:38.734519"], ["group_id", 721], ["person_id", 868], ["role", ""], ["updated_at", "2014-10-13 10:47:38.734519"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 868]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:38.736217' WHERE "people"."id" = 868 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 721]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:38.738290' WHERE "groups"."id" = 721  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0/image/edit Completed 302 Found in 18ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0/image/edit" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.0ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started PUT "/people/marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0/image" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:63895/people/marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0?cache_bust=1413197258 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0?cache_bust=1413197258" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413197258", "id"=>"marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 867]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-be58cd3b-e624-4696-9b1b-09b73769b5b0' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (868) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (720, 721) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (720, 721) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.9ms | ActiveRecord: 1.4ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:38.959855"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:38.959855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 869]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (869) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.5ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:39.011935"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:39.011935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:39.014437"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 10:47:39.014437"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (871) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 49ms (Views: 42.5ms | ActiveRecord: 1.5ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (871) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 871) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 870]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 1.9ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (871) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 871 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:39.112715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 869]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (871) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.7ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:39.140321"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:39.140321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 872]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 872]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 872]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (872) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:39.188472"], ["slug", "surname-0018"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 10:47:39.188472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0018/edit" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0018"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 872]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0018' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (873) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:39.239210"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:39.239210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 874]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (874) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 34.9ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:39.339677"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:39.339677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 13ms (ActiveRecord: 1.3ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 10ms (Views: 7.3ms | ActiveRecord: 0.6ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (875) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (875) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.1ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:39.442921"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:39.442921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 722]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 722]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 722]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "722"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:39.447949"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:39.447949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:39.451100"], ["slug", "surname-0019"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 10:47:39.451100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:39.877391"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:39.877391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 877]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (877) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0019/edit" for 127.0.0.1 at 2014-10-13 11:47:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0019"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0019' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (876) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.4ms | ActiveRecord: 1.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0019" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0019", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"722", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0019"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0019' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (876) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0019' AND "people"."given_name" = '' AND ("people"."id" != 876) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 876 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:47:40.194573"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:40.195781"], ["group_id", 722], ["person_id", 876], ["role", ""], ["updated_at", "2014-10-13 10:47:40.195781"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 876]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:40.197228' WHERE "people"."id" = 876 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 722]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:40.198626' WHERE "groups"."id" = 722  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/surname-0019 Completed 302 Found in 15ms (ActiveRecord: 3.0ms) Started GET "/people/surname-0019" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0019"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0019' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (876) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0019/edit" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0019"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0019' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (876) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 876]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 877]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:40.402299"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:40.402299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 724]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 724]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 724]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "724"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:40.407137"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:40.407137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:40.830400"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:40.830400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 878]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (878) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.0ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 12ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:40 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.5ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"725", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 10:47:41.171252"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:41.171252"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:41.172513"], ["group_id", 725], ["person_id", 879], ["role", ""], ["updated_at", "2014-10-13 10:47:41.172513"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 879]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:41.174015' WHERE "people"."id" = 879 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 725]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:41.175595' WHERE "groups"."id" = 725  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/marco-polo/image/edit Completed 302 Found in 19ms (ActiveRecord: 2.4ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.2ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:63895/people/marco-polo?cache_bust=1413197261 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413197261" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413197261", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 878]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (879) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (724, 725) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (724, 725) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:41.379364"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.379364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 880]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (880) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:41.427023"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:41.427023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (881) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.3ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (881) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (881) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 881) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 881 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.503215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 13ms (ActiveRecord: 1.9ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 880]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (881) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:41.536779"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.536779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 882]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (882) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:41.591519"], ["slug", "surname-0020"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 10:47:41.591519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0020/edit" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0020"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (883) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.6ms | ActiveRecord: 0.9ms) Started DELETE "/people/surname-0020" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (883) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 883]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 882]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 16.5ms | ActiveRecord: 0.3ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 883]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:41.677146"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.677146"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 884]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 884]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 884]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (884) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 884]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:41.767237"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.767237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 885]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 885]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (885) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 885]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 885]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 37.9ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:41.907868"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:41.907868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 886]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 886]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 886]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (886) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.6ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:41.955344"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:41.955344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 886]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (887) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 11:47:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 886]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (887) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 886]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (887) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (18.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 26.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.068647"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.068647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 888]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 888]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 888]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (888) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.114442"], ["slug", "surname-0021"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 10:47:42.114442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.121344"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.121344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 726]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 726]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 726]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "726"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:42.126076"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.126076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.127472"], ["group_id", 727], ["person_id", 889], ["updated_at", "2014-10-13 10:47:42.127472"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:42.128176' WHERE "people"."id" = 889 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:42.128860' WHERE "groups"."id" = 727  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0021/edit" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 888]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (889) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (726, 727) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (726, 727) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 889]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.4ms | ActiveRecord: 1.6ms) Started DELETE "/people/surname-0021" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0021"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 888]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (889) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 142]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 889]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:42.184279' WHERE "people"."id" = 889 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:42.185032' WHERE "groups"."id" = 727 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 889]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 888]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 21.4ms | ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 142]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 889]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.222535"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.222535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 890]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (890) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.269997"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:42.269997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 27.5ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 891]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 890]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.361574"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.361574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 892]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 892]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 892]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (892) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.406632"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-fedd5f46-7be5-47fa-9297-4479ef54dbf8"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 10:47:42.406632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 893]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 893 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:42.411381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.421363"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.421363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 728]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 728]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 728]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "728"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:42.426163"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.426163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.428420"], ["group_id", 729], ["person_id", 893], ["updated_at", "2014-10-13 10:47:42.428420"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 893]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:42.429976' WHERE "people"."id" = 893 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:42.430700' WHERE "groups"."id" = 729  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-fedd5f46-7be5-47fa-9297-4479ef54dbf8" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-fedd5f46-7be5-47fa-9297-4479ef54dbf8"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 892]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-fedd5f46-7be5-47fa-9297-4479ef54dbf8' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (893) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (728, 729) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (728, 729) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.2ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.461555"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.461555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 894]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 894]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 894]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (894) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.509885"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-314be631-8d57-4b45-8228-600596f5e585"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 10:47:42.509885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-314be631-8d57-4b45-8228-600596f5e585" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-314be631-8d57-4b45-8228-600596f5e585"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 894]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-314be631-8d57-4b45-8228-600596f5e585' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (895) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.546573"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.546573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 896]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 896]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 896]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (896) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.594194"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 10:47:42.594194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 897 [["email", nil], ["updated_at", "2014-10-13 10:47:42.595631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 896]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (897) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.624937"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.624937"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 898]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 898]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 898]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (898) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.670725"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 10:47:42.670725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 899]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 899 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 10:47:42.675595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.687151"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.687151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 730]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "730"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:42.692849"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.692849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.696432"], ["group_id", 731], ["person_id", 899], ["updated_at", "2014-10-13 10:47:42.696432"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 899]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:42.698771' WHERE "people"."id" = 899 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:42.699660' WHERE "groups"."id" = 731  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 898]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (899) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (730, 731) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (730, 731) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:42.729861"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:42.729861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 900]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (900) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.777932"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 10:47:42.777932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (901) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.2ms | ActiveRecord: 0.6ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 901], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.820881"], ["updated_at", "2014-10-13 10:47:42.820881"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "a84e5aff-5c0e-4579-8c16-13d7d887e384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.3ms Sent mail to someone.else@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 11:47:42 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543badceca2a3_f3c03fc408865be414680@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/a84e5aff-5c0e-4579-8c16-13d7d887e384?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 19ms (ActiveRecord: 1.3ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 11:47:42 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 900]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (901) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.7ms | ActiveRecord: 1.3ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.896199"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.896199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 732) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 732 [["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.899359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.910596"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.910596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 733) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 733 [["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.913862"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 733) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 733 [["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.918836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 733) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 733 [["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.922272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.932214"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.932214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 734) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 734 [["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.935114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 734) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 734 [["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.938048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 734) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 734 [["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.940945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.950896"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.950896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 735) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 735 [["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.953909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 735) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 735 [["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.956792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 735) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 735 [["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.959555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 735) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 735 [["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.967504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.971787"], ["slug", "surname-0027"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 10:47:42.971787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.975403"], ["slug", "surname-0028"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 10:47:42.975403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.978822"], ["slug", "surname-0029"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 10:47:42.978822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:42.986416"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:42.986416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 736]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 736]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 736]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "736"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:42.991041"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 10:47:42.991041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.993105"], ["group_id", 737], ["person_id", 904], ["updated_at", "2014-10-13 10:47:42.993105"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 904]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:42.994422' WHERE "people"."id" = 904 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:42.995095' WHERE "groups"."id" = 737  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 904]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:42.999484"], ["slug", "surname-0030"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 10:47:42.999484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 905]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.004267"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 10:47:43.004267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 906]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.008170"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:43.008170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 907]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.014352"], ["slug", "surname-0034"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 10:47:43.014352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.020851"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.020851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "738"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.025626"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.025626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 738) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 738 [["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.028609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 738]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "738"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.033363"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.033363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.035546"], ["group_id", 740], ["person_id", 908], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:43.035546"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 908]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.037198' WHERE "people"."id" = 908 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.037955' WHERE "groups"."id" = 740  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.039382"], ["group_id", 739], ["person_id", 908], ["role", "Designer"], ["updated_at", "2014-10-13 10:47:43.039382"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 908]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.040751' WHERE "people"."id" = 908 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.041409' WHERE "groups"."id" = 739  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 908]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.048663"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 10:47:43.048663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0036' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.051510"], ["slug", "surname-0036"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 10:47:43.051510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.057753"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.057753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 741]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 741]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 741]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "741"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.062412"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.062412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.063702"], ["group_id", 742], ["person_id", 910], ["updated_at", "2014-10-13 10:47:43.063702"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.064364' WHERE "people"."id" = 910 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.065014' WHERE "groups"."id" = 742  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"148"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 909]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 148]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 148]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 910]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.070460' WHERE "people"."id" = 910 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 742]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.071894' WHERE "groups"."id" = 742  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 148]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.077123"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 10:47:43.077123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.079903"], ["slug", "surname-0038"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 10:47:43.079903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.087312"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.087312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 743]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 743]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 743]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "743"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.092315"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.092315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.093740"], ["group_id", 744], ["person_id", 912], ["updated_at", "2014-10-13 10:47:43.093740"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.094368' WHERE "people"."id" = 912 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.095137' WHERE "groups"."id" = 744  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"149"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 911]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 149]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 149]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 912]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.099643' WHERE "people"."id" = 912 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 744]] SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.101824' WHERE "groups"."id" = 744  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.115716"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.115716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 745]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 745]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 745]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "745"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.120575"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.120575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 746]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 746]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 746]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "745/746"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:43.125234"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.125234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 747]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 747]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 747]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "745/746/747"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:43.129989"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.129989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:43.557076"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:43.557076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 913]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (913) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (748) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (745, 746, 747, 748) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.0ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 748]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '745/746/747/748' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '745/746/747/748' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 748]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:43.864618"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:43.864618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 914]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 914]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 914]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (914) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 43.0ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.924666"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.924666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 749]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 749]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 749]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "749"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:43.929831"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.929831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 750]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 750]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 750]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "749/750"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:43.934609"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.934609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 751]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 751]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 751]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "749/750/751"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:43.939622"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:43.939622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.942908"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 10:47:43.942908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.944454"], ["group_id", 752], ["person_id", 915], ["updated_at", "2014-10-13 10:47:43.944454"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.945108' WHERE "people"."id" = 915 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.945751' WHERE "groups"."id" = 752  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.947974"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 10:47:43.947974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.949382"], ["group_id", 752], ["person_id", 916], ["updated_at", "2014-10-13 10:47:43.949382"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.949981' WHERE "people"."id" = 916 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.950503' WHERE "groups"."id" = 752  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:43.952666"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 10:47:43.952666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:43.954036"], ["group_id", 752], ["person_id", 917], ["updated_at", "2014-10-13 10:47:43.954036"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:43.954606' WHERE "people"."id" = 917 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:43.955175' WHERE "groups"."id" = 752  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 914]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (752) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (749, 750, 751, 752) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 752]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '749/750/751/752' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '749/750/751/752' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 752]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:43 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:43.996256"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:43.996256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 918]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 918]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 918]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (918) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:44.042880"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.042880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 753]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 753]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 753]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "753"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:44.048612"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.048612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 754]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 754]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 754]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "753/754"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:44.053645"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.053645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 755]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 755]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 755]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "753/754/755"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:44.058342"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.058342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 918]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (756) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (753, 754, 755, 756) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 756]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '753/754/755/756' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '753/754/755/756' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 756]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:44.090288"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:44.090288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 919]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 919]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 919]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (919) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:44.137836"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.137836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "757"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:44.143030"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.143030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 758]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 758]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 758]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "757/758"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:44.147889"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.147889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 759]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 759]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 759]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "757/758/759"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:44.153633"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.153633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 757) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 757 [["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.156672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "757"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:44.161123"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.161123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 919]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (761) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (757, 761) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 761]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '757/761' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '757/761' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 761]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 919]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (761) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (757, 761) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 757]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (757) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '757/761' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.7ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 919]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (761) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (757, 761) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 761 OR "groups"."ancestry" ILIKE '757/761/%') OR "groups"."ancestry" = '757/761')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.3ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (761) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (11.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (12.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 22.6ms | ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:44.257321"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.257321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 762]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 762]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 762]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "762"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:44.262474"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.262474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 763]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 763]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "762/763"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:44.267339"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.267339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 764]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "762/763/764"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:44.272315"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.272315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:44.703587"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:44.703587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 920]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 920]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (920) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:44.949596"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:44.949596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 921]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 921]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 921]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (921) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:44.997806"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:44.997806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 766]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "766"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:45.003280"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.003280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 767]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 767]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 767]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "766/767"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:45.008403"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.008403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 768]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "766/767/768"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:45.013385"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.013385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 921]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (766) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (766) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 766]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 921]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (767) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (766, 767) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 767]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.5ms | ActiveRecord: 2.1ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 921]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (768) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (766, 767, 768) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 768]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767/768' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767/768' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '766/767/768' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.089533"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.089533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 922]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 922]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 922]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (922) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.137372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.137372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 770]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 770]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "770"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:45.142968"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.142968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 771]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 771]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 771]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "770/771"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:45.148287"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.148287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 772]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 772]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 772]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "770/771/772"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:45.165707"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.165707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.168489"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 10:47:45.168489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.170056"], ["group_id", 771], ["person_id", 923], ["updated_at", "2014-10-13 10:47:45.170056"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.170686' WHERE "people"."id" = 923 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.171315' WHERE "groups"."id" = 771  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.173466"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 10:47:45.173466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.174867"], ["group_id", 771], ["person_id", 924], ["updated_at", "2014-10-13 10:47:45.174867"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.175529' WHERE "people"."id" = 924 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.176251' WHERE "groups"."id" = 771  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.178732"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 10:47:45.178732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.180325"], ["group_id", 771], ["person_id", 925], ["updated_at", "2014-10-13 10:47:45.180325"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.180975' WHERE "people"."id" = 925 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.181538' WHERE "groups"."id" = 771  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 922]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (771) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (770, 771) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 771]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '770/771' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '770/771' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '770/771' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 922]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (771) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (770, 771) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 771 OR "groups"."ancestry" ILIKE '770/771/%') OR "groups"."ancestry" = '770/771')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.9ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (773,772,771) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.236817"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.236817"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 926]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 926]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 926]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (926) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.284593"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.284593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 774]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "774"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:45.289847"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.289847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 775]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 775]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 775]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "774/775"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:45.295218"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.295218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 776]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 776]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 776]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "774/775/776"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:45.300837"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.300837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.303665"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 10:47:45.303665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.305193"], ["group_id", 775], ["person_id", 927], ["updated_at", "2014-10-13 10:47:45.305193"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.305827' WHERE "people"."id" = 927 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.306469' WHERE "groups"."id" = 775  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.308824"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 10:47:45.308824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.310320"], ["group_id", 775], ["person_id", 928], ["updated_at", "2014-10-13 10:47:45.310320"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.310951' WHERE "people"."id" = 928 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.311533' WHERE "groups"."id" = 775  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.313692"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 10:47:45.313692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.315217"], ["group_id", 775], ["person_id", 929], ["updated_at", "2014-10-13 10:47:45.315217"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.315920' WHERE "people"."id" = 929 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.316580' WHERE "groups"."id" = 775  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 926]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (775) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (774, 775) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 775]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '774/775' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '774/775' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '774/775' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.343056"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 10:47:45.343056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 930]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.350034"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 10:47:45.350034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 931]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.357277"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 10:47:45.357277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.366129"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.366129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 932]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.374674"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 10:47:45.374674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.380925"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.380925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 933]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.392764"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.392764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 934]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (934) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.443097"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.443097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 780]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "780"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:45.447990"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.447990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:45.450553"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 10:47:45.450553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.452499"], ["group_id", 781], ["leader", "t"], ["person_id", 935], ["role", "Jefe"], ["updated_at", "2014-10-13 10:47:45.452499"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 935]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.454064' WHERE "people"."id" = 935 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.454727' WHERE "groups"."id" = 781  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (935) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (780, 781) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (780, 781) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 935]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.6ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/159?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"159"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 159]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 159]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.525813"], ["event", "destroy"], ["item_id", 159], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 159\ngroup_id: 781\nperson_id: 935\nrole: Jefe\ncreated_at: 2014-10-13 10:47:45.452499000 Z\nupdated_at: 2014-10-13 10:47:45.452499000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.5ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 159], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 935]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:45.530995' WHERE "people"."id" = 935 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 781]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:45.532531' WHERE "groups"."id" = 781  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 29ms (ActiveRecord: 4.2ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (935) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 934]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.4ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 159]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 935]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 781]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (5.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 22.3ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.612733"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.612733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 936]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (936) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.657237"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 10:47:45.657237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (937) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (937) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 937]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.706062"], ["event", "destroy"], ["item_id", 937], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 937\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 10:47:45.657237000 Z\nupdated_at: 2014-10-13 10:47:45.657237000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 937], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 11ms (ActiveRecord: 2.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.4ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 937]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/78" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"78"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 78]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 937]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 937) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.657237"], ["given_name", "Greg"], ["id", 937], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 10:47:45.756914"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.758890"], ["event", "create"], ["item_id", 937], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 936]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 937]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 937]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.3ms | ActiveRecord: 0.7ms)  (0.4ms) SELECT COUNT(*) FROM "people"  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.783111"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.783111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 938]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (938) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (12.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 46.3ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.6ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:45.869039"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 10:47:45.869039"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.872221"], ["event", "create"], ["item_id", 782], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (782) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (782) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 782]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '782' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '782' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 782]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 938]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 782]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:45.916037"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:45.916037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 939]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (939) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:45.965861"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.965861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "783"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:45.970767"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:45.970767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (784) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (783, 784) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (783) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '783/784' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.8ms | ActiveRecord: 2.3ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 11:47:45 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (784) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 783]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '783/784/%' OR "groups"."ancestry" = '783/784')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '783/784' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 784]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:46.008785"], ["event", "destroy"], ["item_id", 784], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 784\nname: original name\ncreated_at: 2014-10-13 10:47:45.970767000 Z\nupdated_at: 2014-10-13 10:47:45.970767000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '783'\nancestry_depth: 1\nteam_email_address: example.user.103@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 784], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (783) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (783) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 783]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '783' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '783' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 783]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 939]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 784]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:46.056192"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:46.056192"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:46.058287"], ["event", "create"], ["item_id", 785], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.106@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 785]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 785]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 785]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "785"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:46.063346"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:46.063346"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:46.065328"], ["event", "create"], ["item_id", 786], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.105@digital.justice.gov.uk\nancestry:\n- \n- '785'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:46.068053"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 10:47:46.068053"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:46.069745"], ["event", "create"], ["item_id", 940], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:46.500981"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:46.500981"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:46.503091"], ["event", "create"], ["item_id", 941], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 941]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (941) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (940) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 45.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"786", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (940) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 940) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 940 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:47:46.779424"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:46.783188"], ["event", "update"], ["item_id", 940], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 940\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 10:47:46.068053000 Z\nupdated_at: 2014-10-13 10:47:46.068053000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:46.784233"], ["group_id", 786], ["person_id", 940], ["role", "Jefe"], ["updated_at", "2014-10-13 10:47:46.784233"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:46.785958"], ["event", "create"], ["item_id", 160], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 786\nperson_id:\n- \n- 940\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 940]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:46.787565' WHERE "people"."id" = 940 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 786]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:46.788995' WHERE "groups"."id" = 786  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/bob Completed 302 Found in 21ms (ActiveRecord: 3.2ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (940) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (785, 786) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (785, 786) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.1ms | ActiveRecord: 1.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 160]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 940]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 786]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 940]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 941]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 940]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 786]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 785]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:46.967271"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:46.967271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 942]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (942) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 31ms (Views: 28.4ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:47:47.059796"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:47:47.059796"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:47.062310"], ["event", "create"], ["item_id", 943], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 11ms (ActiveRecord: 1.4ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (943) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 943]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/88" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"88"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 88]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 943]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 943]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 943]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:47.107064"], ["event", "destroy"], ["item_id", 943], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 943\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 10:47:47.059796000 Z\nupdated_at: 2014-10-13 10:47:47.059796000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 943], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.9ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 942]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 943]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 943]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.7ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:47.131750"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:47.131750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 944]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (944) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:47.185673"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 10:47:47.185673"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (945) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (945) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 945) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 945 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 10:47:47.240299"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:47.243714"], ["event", "update"], ["item_id", 945], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 945\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 10:47:47.185673000 Z\nupdated_at: 2014-10-13 10:47:47.185673000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 14ms (ActiveRecord: 2.0ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (945) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 945]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.8ms) Started POST "/audit_trail/undo/90" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"90"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 90]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 945]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 945) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 945 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 10:47:47.284044"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:47.287279"], ["event", "update"], ["item_id", 945], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 945\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 10:47:47.185673000 Z\nupdated_at: 2014-10-13 10:47:47.240299000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 944]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 945]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 945]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 945]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:47.313722"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:47.313722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 946]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (946) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 32.9ms | ActiveRecord: 1.6ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:47.362516"], ["slug", "surname-0043"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 10:47:47.362516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0043/edit" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0043"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0043' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (947) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0043" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0043", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0043"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0043' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (947) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0043' AND "people"."given_name" = '' AND ("people"."id" != 947) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 947]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 947 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:47:47.422313"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:47.430942"], ["event", "update"], ["item_id", 947], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 947\ngiven_name: \nsurname: Surname-0043\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 10:47:47.362516000 Z\nupdated_at: 2014-10-13 10:47:47.362516000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 947\n given_name: ''\n surname: Surname-0043\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 10:47:47.422313000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0043\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 947\n given_name: ''\n surname: Surname-0043\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 10:47:47.362516000 Z\n updated_at: &2 2014-10-13 10:47:47.422313000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0043\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 947\n given_name: ''\n surname: Surname-0043\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0043\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70111262342660\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 947\n given_name: ''\n surname: Surname-0043\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0043\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413197267-62400-3289\n cache_id: 1413197267-62400-3289\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413197267-62400-3289/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70111262338960\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 947\n given_name: ''\n surname: Surname-0043\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0043\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413197267-62400-3289\n cache_id: 1413197267-62400-3289\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413197267-62400-3289/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413197267-62400-3289\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413197267-62400-3289/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0043/image/edit Completed 302 Found in 24ms (ActiveRecord: 2.7ms) Started GET "/people/surname-0043/image/edit" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0043"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0043' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 946]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 947]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:47.484331"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:47.484331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 948]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (948) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:47.532563"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:47.532563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "787"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:47.537287"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:47.537287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (788) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (787, 788) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (787) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '787/788' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 16.8ms | ActiveRecord: 2.5ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"787", "team_email_address"=>"example.user.107@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (788) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 787]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 788) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 788) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 788 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 10:47:47.579451"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:47.582583"], ["event", "update"], ["item_id", 788], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 788\nname: original name\ncreated_at: 2014-10-13 10:47:47.537287000 Z\nupdated_at: 2014-10-13 10:47:47.537287000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '787'\nancestry_depth: 1\nteam_email_address: example.user.107@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 14ms (ActiveRecord: 2.7ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (788) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (787, 788) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 788]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '787/788' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '787/788' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 788]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.9ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 11:47:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 948]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 788]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:47.621557"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 10:47:47.621557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:47.624199"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 10:47:47.624199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:47.630717"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:47.630717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 789]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 789]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 789]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "789"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:47.635307"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:47.635307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:47.637279"], ["group_id", 790], ["person_id", 950], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:47.637279"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 950]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:47.638675' WHERE "people"."id" = 950 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:47.639346' WHERE "groups"."id" = 790  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 949]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 950]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (950) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (950) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (950) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:48.666863"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 10:47:48.666863"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:48.669668"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 10:47:48.669668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:48.676657"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:48.676657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 791]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 791]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 791]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "791"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:48.681538"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:48.681538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:48.683566"], ["group_id", 792], ["person_id", 952], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:48.683566"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 952]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:48.685049' WHERE "people"."id" = 952 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:48.685733' WHERE "groups"."id" = 792  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 951]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 952]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:49.708343"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 10:47:49.708343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:49.711062"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 10:47:49.711062"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:49.720157"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:49.720157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 793]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 793]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 793]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "793"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:49.725699"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:49.725699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:49.727734"], ["group_id", 794], ["person_id", 954], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:49.727734"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 954]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:49.729083' WHERE "people"."id" = 954 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:49.729761' WHERE "groups"."id" = 794  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 953]] SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 954]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951, 953) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951, 953) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (949, 951, 953) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:50.754856"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 10:47:50.754856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:50.757902"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 10:47:50.757902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:50.764220"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:50.764220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 795]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 795]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 795]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "795"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:50.768653"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:50.768653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:50.770696"], ["group_id", 796], ["person_id", 956], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:50.770696"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 956]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:50.772299' WHERE "people"."id" = 956 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:50.773077' WHERE "groups"."id" = 796  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 955]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 956]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 950, 954, 952) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 950, 954, 952) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 950, 954, 952) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:51.794241"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 10:47:51.794241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:51.797085"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 10:47:51.797085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:51.805456"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:51.805456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 797]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 797]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 797]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "797"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:51.810871"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:51.810871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:51.812911"], ["group_id", 798], ["person_id", 958], ["role", "Cleaner"], ["updated_at", "2014-10-13 10:47:51.812911"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 958]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:51.814569' WHERE "people"."id" = 958 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:51.815430' WHERE "groups"."id" = 798  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 957]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 958]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 958, 952, 950, 954) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 958, 952, 950, 954) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (956, 958, 952, 950, 954) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.887055"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.887055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 799]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 799]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 799]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "799"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:52.893002"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.893002"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.907140"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.907140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 801]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 801]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 801]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "801"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:52.911620"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.911620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 802]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 802]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 802]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "801/802"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:52.916423"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.916423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 803]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 803]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 803]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "801/802/803"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:52.923075"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.923075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0028' AND "groups"."id" != 802) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.929394"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.929394"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (805) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.957566"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.957566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 806]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 806]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 806]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "806"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:52.962652"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.962652"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 807]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 807]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 807]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "806/807"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:52.969447"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.969447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 808]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 808]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 808]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "806/807/808"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:47:52.977074"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.977074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (806, 807, 808, 809) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.986289"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.986289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 810]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 810]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 810]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "810"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:52.991512"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.991512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '810/811/%' OR "groups"."ancestry" = '810/811'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:52.999995"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:52.999995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 812]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 812]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 812]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "812"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.004619"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.004619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '812/813/%' OR "groups"."ancestry" = '812/813')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 813]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 813]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.014853"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.014853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 814]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 814]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "814"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.019739"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.019739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.022748"], ["slug", "surname-0044"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 10:47:53.022748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.024038"], ["group_id", 815], ["leader", "t"], ["person_id", 959], ["updated_at", "2014-10-13 10:47:53.024038"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.024858' WHERE "people"."id" = 959 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.025548' WHERE "groups"."id" = 815  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 815]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.033699"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.033699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '816'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.041059"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.041059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.049962"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.049962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 818]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 818]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 818]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "818"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.055716"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.055716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 818]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '818'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.064398"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.064398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 820]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 820]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 820]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "820"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.068854"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.068854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.076466"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.076466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "822"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.081669"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.081669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 822]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 823) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 823) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 823 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 10:47:53.085964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 823]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.093582"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.093582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "824"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.098502"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.098502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 824) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 824 [["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.101535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 824]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "824"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.107177"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.107177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.115570"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.115570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "827"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.119909"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.119909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 827) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 827 [["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.122764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "827"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.128029"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.128029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 827) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 827 [["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.131384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 827]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "827"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.139947"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.139947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.148391"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.148391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 831]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 831]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 831]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "831"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.153753"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.153753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0045' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.156932"], ["slug", "surname-0045"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 10:47:53.156932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.158328"], ["group_id", 832], ["person_id", 960], ["updated_at", "2014-10-13 10:47:53.158328"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.158895' WHERE "people"."id" = 960 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 832]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.160378' WHERE "groups"."id" = 832  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '831/832' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 832]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.171106"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.171106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 833]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 833]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 833]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "833"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.175768"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.175768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.180122"], ["slug", "surname-0046"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 10:47:53.180122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.181742"], ["group_id", 834], ["person_id", 961], ["updated_at", "2014-10-13 10:47:53.181742"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.182436' WHERE "people"."id" = 961 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 834]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.183790' WHERE "groups"."id" = 834  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '833/834' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 834]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.193743"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.193743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 835]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 835]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 835]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "835"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.198523"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.198523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 836]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 836]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 836]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "835/836"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:53.204032"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.204032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 836]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '835/836' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.212557"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.212557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 838]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 838]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 838]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "838"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.217637"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.217637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '838/839' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 839]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.227749"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.227749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 840]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 840]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 840]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "840"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.232538"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.232538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '840/841' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.240921"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.240921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 842]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 842]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 842]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "842"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.246506"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.246506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '842/843' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.254938"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.254938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.261020"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.261020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "845"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.265566"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.265566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 845]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.274323"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.274323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 847]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 847]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 847]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "847"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.278864"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.278864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.282097"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 10:47:53.282097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.284717"], ["group_id", 848], ["person_id", 962], ["updated_at", "2014-10-13 10:47:53.284717"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.285435' WHERE "people"."id" = 962 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 848]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.286850' WHERE "groups"."id" = 848  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 848 OR "groups"."ancestry" ILIKE '847/848/%') OR "groups"."ancestry" = '847/848')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (848) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.295664"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.295664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 849]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 849]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 849]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0048-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "849"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.299826"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.299826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.303161"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 10:47:53.303161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.305097"], ["group_id", 850], ["person_id", 963], ["updated_at", "2014-10-13 10:47:53.305097"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.305825' WHERE "people"."id" = 963 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 850]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.307142' WHERE "groups"."id" = 850  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 850]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 850]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 850]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "849/850"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:53.312138"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.312138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.315300"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 10:47:53.315300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.317315"], ["group_id", 851], ["person_id", 964], ["updated_at", "2014-10-13 10:47:53.317315"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.318507' WHERE "people"."id" = 964 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 851]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.320544' WHERE "groups"."id" = 851  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 850 OR "groups"."ancestry" ILIKE '849/850/%') OR "groups"."ancestry" = '849/850')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (850,851) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.330256"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.330256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 852]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 852]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 852]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "852"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.334596"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.334596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.338123"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 10:47:53.338123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.340091"], ["group_id", 853], ["person_id", 965], ["updated_at", "2014-10-13 10:47:53.340091"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.340706' WHERE "people"."id" = 965 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 853]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.342009' WHERE "groups"."id" = 853  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 853]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 853]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 853]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "852/853"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:53.347226"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.347226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.350705"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 10:47:53.350705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.352889"], ["group_id", 854], ["person_id", 966], ["updated_at", "2014-10-13 10:47:53.352889"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.353811' WHERE "people"."id" = 966 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 854]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.355340' WHERE "groups"."id" = 854  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.357117"], ["group_id", 854], ["person_id", 966], ["updated_at", "2014-10-13 10:47:53.357117"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.357758' WHERE "people"."id" = 966 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 854]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.358914' WHERE "groups"."id" = 854  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 853 OR "groups"."ancestry" ILIKE '852/853/%') OR "groups"."ancestry" = '852/853')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.0ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (853,854) group by p.id;  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.370749"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.370749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 855]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 855]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 855]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "855"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:53.375565"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.375565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.378974"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 10:47:53.378974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.381166"], ["group_id", 856], ["person_id", 967], ["updated_at", "2014-10-13 10:47:53.381166"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.381867' WHERE "people"."id" = 967 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 856]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.383299' WHERE "groups"."id" = 856  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 856]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "855/856"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:53.389107"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.389107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.392572"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 10:47:53.392572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.394629"], ["group_id", 857], ["person_id", 968], ["updated_at", "2014-10-13 10:47:53.394629"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.395304' WHERE "people"."id" = 968 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 857]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.409069' WHERE "groups"."id" = 857  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:53.410802"], ["group_id", 857], ["person_id", 968], ["updated_at", "2014-10-13 10:47:53.410802"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:53.411525' WHERE "people"."id" = 968 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 857]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:53.412847' WHERE "groups"."id" = 857  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 856 OR "groups"."ancestry" ILIKE '855/856/%') OR "groups"."ancestry" = '855/856')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (856,857) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:53.422280"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:53.422280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:53.425326"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 10:47:53.425326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 969]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:54.444220"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:54.444220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 970]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 970]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 970]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (970) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 970]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.5ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 970]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (969) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 969]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 0.9ms) SQL (0.2ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.570527"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 10:47:54.570527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 971]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.578674"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 10:47:54.578674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 972]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.585636"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 10:47:54.585636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 973]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.603527"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.603527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.616525"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.616525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:54.624603"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:54.624603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:54.634773"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:54.634773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:54.644822"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:54.644822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:54.654959"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:54.654959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 10:47:54.665755"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 10:47:54.665755"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.676953"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.676953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:54.684839"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:54.684839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 979]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 979]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 979]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (979) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.1ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:54 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 979]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.743125"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 10:47:54.743125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 980]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.750766"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 10:47:54.750766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 981]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.758063"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 10:47:54.758063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 982]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.767687"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.767687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 862]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 862]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 862]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0056-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "862"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:54.772443"], ["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.772443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.777316"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 10:47:54.777316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0054", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 983]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0054' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0054' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.783923"], ["image", nil], ["slug", "surname-0054"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 10:47:54.783923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0054/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.790353"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 10:47:54.790353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0056"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 985]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0056' LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0056' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.810929"], ["slug", "surname-0056"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 10:47:54.810929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0056 Completed 302 Found in 20ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.818454"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 10:47:54.818454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0058"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 987]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0058' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0058' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.825163"], ["slug", "surname-0058"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 10:47:54.825163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0058 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.830629"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 10:47:54.830629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0060"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 989]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0060' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0060' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.836880"], ["slug", "surname-0060"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 10:47:54.836880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0060 Completed 302 Found in 5ms (ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.842678"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 10:47:54.842678"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 991]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.851606"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 10:47:54.851606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 992]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.860732"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 10:47:54.860732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 993]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.871566"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.871566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 864]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 864]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 864]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0057-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "864"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:54.876289"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:54.876289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.880610"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 10:47:54.880610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 994]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.889014"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 10:47:54.889014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.891672"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 10:47:54.891672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 995]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.901197"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 10:47:54.901197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0067' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.904277"], ["slug", "surname-0067"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 10:47:54.904277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0068", "image"=>"#"}, "id"=>"surname-0067"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 997]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0067' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (998) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0068' AND "people"."given_name" IS NULL AND ("people"."id" != 998) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 998]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 998 [["image", nil], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 10:47:54.913223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0067/image/edit Completed 302 Found in 9ms (ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.919334"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 10:47:54.919334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0070' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.922469"], ["slug", "surname-0070"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 10:47:54.922469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0071", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0070"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 999]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0070' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1000) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0071' AND "people"."given_name" IS NULL AND ("people"."id" != 1000) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1000 [["surname", "Surname-0071"], ["updated_at", "2014-10-13 10:47:54.931038"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0070 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.936793"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 10:47:54.936793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.940078"], ["slug", "surname-0073"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 10:47:54.940078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0074", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0073"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1001]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1002) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0074' AND "people"."given_name" IS NULL AND ("people"."id" != 1002) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1002 [["surname", "Surname-0074"], ["updated_at", "2014-10-13 10:47:54.948906"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0073 Completed 302 Found in 8ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1002]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.954929"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 10:47:54.954929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0076' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.958226"], ["slug", "surname-0076"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 10:47:54.958226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0077", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0076"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1003]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0076' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1004) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0077' AND "people"."given_name" IS NULL AND ("people"."id" != 1004) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1004 [["surname", "Surname-0077"], ["updated_at", "2014-10-13 10:47:54.967264"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0076 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.975188"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 10:47:54.975188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.979401"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 10:47:54.979401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0079"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1005]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0079' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1006) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:54.991049"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 10:47:54.991049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:54.994761"], ["slug", "surname-0081"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 10:47:54.994761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0081"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1007]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0081' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1008) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.006441"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 10:47:55.006441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.010324"], ["slug", "surname-0083"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 10:47:55.010324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0083"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1009]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0083' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1010) ORDER BY groups.name Completed 200 OK in 8ms (Views: 1.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.028365"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.028365"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 866]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 866]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 866]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "866"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.034162"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.034162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.038753"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 10:47:55.038753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.044218"], ["slug", "surname-0085"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 10:47:55.044218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0085"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1011]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0085' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1012) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.056870"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 10:47:55.056870"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.059359"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 10:47:55.059359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.061730"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 10:47:55.061730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1013]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1015) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 1015) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.074010"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 10:47:55.074010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1016]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.081049"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 10:47:55.081049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1017]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.089986"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.089986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 868]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 868]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 868]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "868"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.094848"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.094848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.099556"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 10:47:55.099556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0090' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.101916"], ["slug", "surname-0090"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 10:47:55.101916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0090"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1018]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0090' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1019) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.112070"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 10:47:55.112070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0092' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.114523"], ["slug", "surname-0092"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 10:47:55.114523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0092"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1020]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1021) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.126723"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.126723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 870]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 870]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 870]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "870"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.131425"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.131425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.136033"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 10:47:55.136033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.139303"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 10:47:55.139303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1022]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1023) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.150809"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 10:47:55.150809"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1024]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.156825"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 10:47:55.156825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.160626"], ["slug", "surname-0097"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 10:47:55.160626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0097"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1025]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0097' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1026) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1026]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.170941"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 10:47:55.170941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0099' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.174323"], ["slug", "surname-0099"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 10:47:55.174323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0099"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1027]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0099' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1028) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1028]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.185840"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 10:47:55.185840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0101' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.189261"], ["slug", "surname-0101"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 10:47:55.189261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0101"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1029]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0101' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1030) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1030]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.199898"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 10:47:55.199898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0103' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.203249"], ["slug", "surname-0103"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 10:47:55.203249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0103"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1031]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0103' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1032) ORDER BY groups.name Completed 200 OK in 18ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.226173"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 10:47:55.226173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0105' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.229535"], ["slug", "surname-0105"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 10:47:55.229535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0105"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1033]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0105' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1034) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.242376"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.242376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 872]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 872]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 872]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "872"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.246989"], ["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.246989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.251742"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 10:47:55.251742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0107' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.255120"], ["slug", "surname-0107"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 10:47:55.255120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0107"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1035]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0107' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1036) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.267084"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 10:47:55.267084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0109' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.270466"], ["slug", "surname-0109"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 10:47:55.270466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.277353"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.277353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 874]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 874]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 874]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "874"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.281872"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.281872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.283431"], ["group_id", 875], ["person_id", 1038], ["updated_at", "2014-10-13 10:47:55.283431"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1038]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.284808' WHERE "people"."id" = 1038 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.285550' WHERE "groups"."id" = 875  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1037]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1038) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:47:55.298781"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 10:47:55.298781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0111' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.303055"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0111"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 10:47:55.303055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.307175"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 10:47:55.307175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.309552"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 10:47:55.309552"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.311434"], ["event", "create"], ["item_id", 1042], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1042]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1042]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.315490"], ["event", "destroy"], ["item_id", 1042], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1042\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 10:47:55.309552000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1042], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"95"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1041]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 95]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1042]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1042) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.309552"], ["id", 1042], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 10:47:55.323870"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.325691"], ["event", "create"], ["item_id", 1042], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0112"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.331667"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 10:47:55.331667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0114' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.334080"], ["slug", "surname-0114"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 10:47:55.334080"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.335871"], ["event", "create"], ["item_id", 1044], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0114\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"97"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1043]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 97]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1044]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1044]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1044]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.344656"], ["event", "destroy"], ["item_id", 1044], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1044\ngiven_name: \nsurname: Surname-0114\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 10:47:55.334080000 Z\nupdated_at: 2014-10-13 10:47:55.334080000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0113"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1044], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1044]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.350564"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 10:47:55.350564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0116' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.353092"], ["slug", "surname-0116"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 10:47:55.353092"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.354716"], ["event", "create"], ["item_id", 1046], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0116\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.361166"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.361166"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.362926"], ["event", "create"], ["item_id", 876], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.202@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 876]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 876]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 876]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "876"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.367659"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.367659"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.369496"], ["event", "create"], ["item_id", 877], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0063\nteam_email_address:\n- \n- example.user.201@digital.justice.gov.uk\nancestry:\n- \n- '876'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.370846"], ["group_id", 877], ["person_id", 1046], ["updated_at", "2014-10-13 10:47:55.370846"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.372329"], ["event", "create"], ["item_id", 179], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1046\ngroup_id:\n- \n- 877\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.373095' WHERE "people"."id" = 1046 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.373827' WHERE "groups"."id" = 877  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"102"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1045]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 102]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 179]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.381841"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 10:47:55.381841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0118' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.385528"], ["slug", "surname-0118"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 10:47:55.385528"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.387919"], ["event", "create"], ["item_id", 1048], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0118\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.396183"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.396183"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.398304"], ["event", "create"], ["item_id", 878], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.204@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 878]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 878]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 878]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0064' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "878"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.403194"], ["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.403194"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.405077"], ["event", "create"], ["item_id", 879], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0064\nteam_email_address:\n- \n- example.user.203@digital.justice.gov.uk\nancestry:\n- \n- '878'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.406343"], ["group_id", 879], ["person_id", 1048], ["updated_at", "2014-10-13 10:47:55.406343"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.407881"], ["event", "create"], ["item_id", 180], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1048\ngroup_id:\n- \n- 879\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.408707' WHERE "people"."id" = 1048 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.409512' WHERE "groups"."id" = 879  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 180]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.411640"], ["event", "destroy"], ["item_id", 180], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 180\ngroup_id: 879\nperson_id: 1048\nrole: \ncreated_at: &1 2014-10-13 10:47:55.406343000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 180], ["item_type", "Peoplefinder::Membership"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.413054' WHERE "people"."id" = 1048 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.413663' WHERE "groups"."id" = 879  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"107"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1047]] Peoplefinder::Version Load (0.1ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 107]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 180]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.426160"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:55.426160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1049]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1049]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1049]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1049) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.472245"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.472245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "880"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.477801"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.477801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 881]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 881]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 881]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "880/881"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:55.483691"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.483691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 880]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "880"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.492419"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.492419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 883]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 883]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 883]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "880/883"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:55.498733"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.498733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0119' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.501505"], ["slug", "surname-0119"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 10:47:55.501505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.503011"], ["group_id", 882], ["person_id", 1050], ["updated_at", "2014-10-13 10:47:55.503011"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.503675' WHERE "people"."id" = 1050 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.504348' WHERE "groups"."id" = 882  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.505609"], ["group_id", 884], ["person_id", 1050], ["updated_at", "2014-10-13 10:47:55.505609"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.506242' WHERE "people"."id" = 1050 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.506852' WHERE "groups"."id" = 884  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1049]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (884) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (880, 883, 884) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 884]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '880/883/884' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '880/883/884' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 884]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.7ms | ActiveRecord: 2.1ms) Started GET "/people/surname-0119" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1049]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1050) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 884]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (880, 881, 882) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (880, 883, 884) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (880, 881, 882) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (880, 883, 884) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.561790"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:55.561790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1051]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1051]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1051]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1051) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 43.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0120' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.618501"], ["slug", "surname-0120"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 10:47:55.618501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0120" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0120"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1051]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0120' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1052) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.644023"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:55.644023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1053]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1053]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1053) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0121' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.689339"], ["slug", "surname-0121"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 10:47:55.689339"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0121" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0121"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1053]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0121' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1054) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.740446"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.740446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 885]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 885]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "885"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.745451"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.745451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 886]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 886]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 886]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "885/886"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:47:55.750539"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.750539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:55.770367"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:55.770367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1055]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1055]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1055) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.818017"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.818017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 888]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 888]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 888]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "888"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.824093"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.824093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0122' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.826890"], ["slug", "surname-0122"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 10:47:55.826890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.828724"], ["group_id", 889], ["person_id", 1056], ["updated_at", "2014-10-13 10:47:55.828724"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1056]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.830127' WHERE "people"."id" = 1056 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.830798' WHERE "groups"."id" = 889  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0122/edit" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0122"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1055]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0122' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1056) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (888, 889) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (888, 889) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1056]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.3ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/183?referer=%2Fpeople%2Fsurname-0122%2Fedit" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0122/edit", "id"=>"183"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1055]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 183]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 183]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1056]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.883115' WHERE "people"."id" = 1056 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 889]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.884599' WHERE "groups"."id" = 889  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0122/edit Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/people/surname-0122/edit" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0122"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0122' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1056) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (17.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.5ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1056]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1056]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:55.955137"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.955137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 890]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 890]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 890]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "890"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:55.961080"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:55.961080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0123' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.963812"], ["slug", "surname-0123"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 10:47:55.963812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:55.965714"], ["group_id", 891], ["person_id", 1057], ["updated_at", "2014-10-13 10:47:55.965714"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1057]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:55.967263' WHERE "people"."id" = 1057 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:55.968021' WHERE "groups"."id" = 891  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:56.400202"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:56.400202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1058]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1058) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0123/edit" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0123"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0123' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1057) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (890, 891) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (890, 891) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1057]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.3ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0123" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0123", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"891", "leader"=>"0", "id"=>"184"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0123"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0123' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1057) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1057]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1057 AND "memberships"."id" != 184 AND "memberships"."group_id" = 891) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 891 AND "memberships"."id" != 184 AND "memberships"."person_id" = 1057) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0123' AND "people"."given_name" = '' AND ("people"."id" != 1057) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1057 AND "memberships"."id" != 184 AND "memberships"."group_id" = 891) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 891 AND "memberships"."id" != 184 AND "memberships"."person_id" = 1057) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1057 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:47:56.682296"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 184 [["role", "Head Honcho"], ["updated_at", "2014-10-13 10:47:56.683343"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:56.684110' WHERE "people"."id" = 1057 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:56.684721' WHERE "groups"."id" = 891  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/surname-0123 Completed 302 Found in 17ms (ActiveRecord: 3.2ms) Started GET "/people/surname-0123" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0123"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1058]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0123' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1057) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (890, 891) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (890, 891) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1057]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:56.780500"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:56.780500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 892]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 892]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 892]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "892"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:56.785066"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:56.785066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:57.222983"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:57.222983"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1059]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1059) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 46.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"893", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:47:57.519205"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 10:47:57.519205"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:57.520549"], ["group_id", 893], ["leader", "t"], ["person_id", 1060], ["role", "Head Honcho"], ["updated_at", "2014-10-13 10:47:57.520549"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1060]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:57.522340' WHERE "people"."id" = 1060 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 893]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:57.524044' WHERE "groups"."id" = 893  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/taylor Completed 302 Found in 14ms (ActiveRecord: 2.5ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1059]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1060) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (892, 893) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (892, 893) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.2ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1060]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:57.618727"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:57.618727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "894"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:57.624635"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:57.624635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0124' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:57.627798"], ["slug", "surname-0124"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 10:47:57.627798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:47:57.629825"], ["group_id", 895], ["person_id", 1061], ["updated_at", "2014-10-13 10:47:57.629825"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1061]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:57.631213' WHERE "people"."id" = 1061 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:57.631899' WHERE "groups"."id" = 895  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 894) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 894 [["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:57.634878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 894]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "894"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:57.639383"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:57.639383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:57 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:58.079851"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:58.079851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1062]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1062) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0124/edit" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1061) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 895) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 895) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1061]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 38.7ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/people/add_membership?id=surname-0124" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1061) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.5ms) Completed 200 OK in 26ms (Views: 19.1ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0124" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0124", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"895", "leader"=>"0", "id"=>"186"}, "70111191729240"=>{"role"=>"Talker", "group_id"=>"896", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1061) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1061]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1061 AND "memberships"."id" != 186 AND "memberships"."group_id" = 895) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 895 AND "memberships"."id" != 186 AND "memberships"."person_id" = 1061) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0124' AND "people"."given_name" = '' AND ("people"."id" != 1061) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1061 AND "memberships"."id" != 186 AND "memberships"."group_id" = 895) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 895 AND "memberships"."id" != 186 AND "memberships"."person_id" = 1061) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1061 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:47:59.375548"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 186 [["role", ""], ["updated_at", "2014-10-13 10:47:59.376668"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:59.377429' WHERE "people"."id" = 1061 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:59.378010' WHERE "groups"."id" = 895 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:59.378686"], ["group_id", 896], ["person_id", 1061], ["role", "Talker"], ["updated_at", "2014-10-13 10:47:59.378686"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1061]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:47:59.380086' WHERE "people"."id" = 1061 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 896]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:47:59.381317' WHERE "groups"."id" = 896  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/people/surname-0124 Completed 302 Found in 21ms (ActiveRecord: 4.3ms) Started GET "/people/surname-0124" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1062]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1061) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 896) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 895) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 896) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (894, 895) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1061]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:47:59.475317"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:59.475317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 897]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 897]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 897]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "897"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:47:59.480330"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:47:59.480330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:47:59.907604"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:47:59.907604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1063]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1063) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:47:59 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1063]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0125' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.265329"], ["slug", "surname-0125"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 10:48:00.265329"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 1064 [["updated_at", "2014-10-13 10:48:00.266988"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0126' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.271167"], ["slug", "surname-0126"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 10:48:00.271167"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0127' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:00.275627"], ["slug", "surname-0127"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 10:48:00.275627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.286469"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.286469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1067]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1067]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1067) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.342971"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.342971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "899"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:00.347911"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.347911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0066/edit" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0066"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0066' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (900) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (899, 900) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (899) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '899/900' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.7ms | ActiveRecord: 2.2ms) Started DELETE "/teams/group-0066" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0066"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0066' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (900) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]] CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 899]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '899/900/%' OR "groups"."ancestry" = '899/900')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '899/900' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 900]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (899) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (899) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 899]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '899' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '899' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 899]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 900]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.416220"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.416220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1068]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1068]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1068]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1068) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.464679"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.464679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 901]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 901]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 901]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0067-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0067' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "901"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:00.469421"], ["name", "Group-0067"], ["slug", "group-0067"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.469421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 901]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1068]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (901) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (901) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '901' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '901' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 14.2ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.502472"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.502472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1069]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1069]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1069]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1069) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.550208"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.550208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0068-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0068' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0068' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "903"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:00.554966"], ["name", "Group-0068"], ["slug", "group-0068"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.554966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0068/edit" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0068"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1069]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0068' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (904) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (903, 904) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 903]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (903) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '903/904' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.8ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.592436"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.592436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1070]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1070) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.5ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.650607"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.650607"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 905]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 905]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 905]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "905"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:00.655785"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.655785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (906) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (905, 906) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 906]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '905/906' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '905/906' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 906]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.0ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.4ms | ActiveRecord: 0.5ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"906", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 906]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 906]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 906]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 906]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "905/906"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:00.707136"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 10:48:00.707136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 11ms (ActiveRecord: 2.3ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1070]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (907) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (905, 906, 907) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 907]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '905/906/907' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '905/906/907' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 907]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 906]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.741067"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.741067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1071]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1071]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1071]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1071) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.2ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1071]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.809155"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.809155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1072]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1072]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1072]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1072) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:00.858486"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 10:48:00.858486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:00.865086"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.865086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0069-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0069' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "908"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:00.869486"], ["name", "Group-0069"], ["slug", "group-0069"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:00.869486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:00.870750"], ["group_id", 909], ["person_id", 1073], ["updated_at", "2014-10-13 10:48:00.870750"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:00.871475' WHERE "people"."id" = 1073 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:00.872211' WHERE "groups"."id" = 909  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0069/edit" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0069"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1072]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0069' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (909) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (908, 909) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 908]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (908) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '908/909' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.6ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:00.909388"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:00.909388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1074]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1074]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1074]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1074) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 30.7ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1074]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1074]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:48:00.988733"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 10:48:00.988733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 11:48:00 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1074]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (910) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (910) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 910]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '910' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '910' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 910]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:01.025273"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:01.025273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 911]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 911]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 911]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "911"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:01.030549"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:01.030549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "911/912"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:01.035418"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:01.035418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:01.459903"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:01.459903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1075]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1075) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (913) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (911, 912, 913) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 913]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '911/912/913' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '911/912/913' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 913]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 2.1ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (913) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (911, 912, 913) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (911, 912) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '911/912/913' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.9ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"912", "team_email_address"=>"example.user.237@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (913) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 913) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 913) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 913 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 10:48:01.789441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/teams/cyberdigital-cyberservices Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1075]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (913) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (911, 912, 913) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 913]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '911/912/913' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '911/912/913' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 913]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 1.8ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 913]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 912]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:01.882034"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:01.882034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (12.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 16.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:02.321948"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:02.321948"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1076]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1076) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (914) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (914) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 914]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '914' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '914' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 914]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.1ms | ActiveRecord: 0.6ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"914", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 914]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 914]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 914]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 914]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "914"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:02.596852"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 10:48:02.596852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/teams/csg Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (915) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (914, 915) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 915]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '914/915' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '914/915' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 915]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 914]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:02.687336"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:02.687336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1077]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1077) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 10:48:02.758689"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 10:48:02.758689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (916) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (916) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 916]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '916' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '916' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 916]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.0ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1077]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (916) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (916) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '916' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '916' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.8ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:02.831022"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:02.831022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "917"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:02.836933"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:02.836933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "917/918"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:02.842471"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:02.842471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:03.283787"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:03.283787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1078]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 2.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1078) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (919) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (917, 918, 919) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 919]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '917/918/919' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '917/918/919' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 919]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 2.9ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (919) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (917, 918, 919) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 918]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (917, 918) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '917/918/919' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.1ms | ActiveRecord: 2.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"917", "team_email_address"=>"example.user.241@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (919) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 919) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 919) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '917/918/919/%' OR "groups"."ancestry" = '917/918/919')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 919 [["ancestry", "917"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 10:48:03.631269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (919) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (917, 919) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 919]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '917/919' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '917/919' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 919]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 1.8ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 919]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 917]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:03.729911"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:03.729911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 920]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 920]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "920"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:03.735766"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:03.735766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:63895/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:03 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:04.167948"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:04.167948"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1079]] Redirected to http://127.0.0.1:63895/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1079) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (11.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (12.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 23.4ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"921", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 921]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 921]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 921]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 921]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "920/921"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.426812"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 10:48:04.426812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:63895/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1079]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (922) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (920, 921, 922) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 922]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '920/921/922' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '920/921/922' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 922]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.6ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.517865"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.517865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 923]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 923]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 923]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "923"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.522547"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.522547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "923/924"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.527572"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.527572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "923/924/925"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.532468"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.532468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 925]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "923/924/925"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.537253"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.537253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "923/924"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.542517"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.542517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 924]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.552080"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.552080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 929]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 929]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 929]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "929"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.556394"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.556394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "929/930"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.561585"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.561585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "929/930/931"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.566650"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.566650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 931]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "929/930/931"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.571528"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.571528"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 930]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "929/930"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.576271"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.576271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 930 OR "groups"."ancestry" ILIKE '929/930/%') OR "groups"."ancestry" = '929/930')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.584617"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.584617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 935]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 935]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 935]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "935"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.589490"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.589490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "935/936"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.594661"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.594661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "935/936/937"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.599525"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.599525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 937]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "935/936/937"], ["ancestry_depth", 3], ["created_at", "2014-10-13 10:48:04.604468"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.604468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 936]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "935/936"], ["ancestry_depth", 2], ["created_at", "2014-10-13 10:48:04.609283"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.609283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 936 OR "groups"."ancestry" ILIKE '935/936/%') OR "groups"."ancestry" = '935/936')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.621020"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.621020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 941]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 941]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 941]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0070-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0070' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "941"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.625802"], ["name", "Group-0070"], ["slug", "group-0070"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.625802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:04.646607"], ["updated_at", "2014-10-13 10:48:04.646607"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "43d55f43-9ba1-444e-a06e-631e0f4b6abb"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 8.7ms Sent mail to james.darling@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:04 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bade4a1379_f3c03fc408865be414749@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/43d55f43-9ba1-444e-a06e-631e0f4b6abb If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 5.5ms | ActiveRecord: 0.5ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.680431"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.680431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 943]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 943]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 943]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0071-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "943"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.685045"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.685045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.687841"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 10:48:04.687841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:04.691837"], ["updated_at", "2014-10-13 10:48:04.691837"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "6c116a27-e01f-4a4b-89cf-a2fe57959e65"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/6c116a27-e01f-4a4b-89cf-a2fe57959e65" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"6c116a27-e01f-4a4b-89cf-a2fe57959e65"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '6c116a27-e01f-4a4b-89cf-a2fe57959e65' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1080]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1080]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 0.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1080]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1080) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.747184"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.747184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 945]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 945]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 945]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0072-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "945"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.752654"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.752654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.756128"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 10:48:04.756128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:04.762063"], ["updated_at", "2014-10-13 10:48:04.762063"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "8be38912-5927-466d-b8fb-724bfc50f50c"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1081]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 15.1ms Sent mail to test.user@digital.justice.gov.uk (18.0ms) Date: Mon, 13 Oct 2014 11:48:04 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade4bd005_f3c03fc408865be414875@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/8be38912-5927-466d-b8fb-724bfc50f50c?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/8be38912-5927-466d-b8fb-724bfc50f50c?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"8be38912-5927-466d-b8fb-724bfc50f50c"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '8be38912-5927-466d-b8fb-724bfc50f50c' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1081]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1081) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.843687"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.843687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 947]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 947]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 947]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "947"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.848312"], ["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.848312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:04.852539"], ["updated_at", "2014-10-13 10:48:04.852539"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "6a89fb7d-4e47-402c-964f-dfbf3724de30"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/6a89fb7d-4e47-402c-964f-dfbf3724de30" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"6a89fb7d-4e47-402c-964f-dfbf3724de30"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '6a89fb7d-4e47-402c-964f-dfbf3724de30' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:04.859667"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 10:48:04.859667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1082]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1082]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1082]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1082) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.926805"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.926805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 949]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 949]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 949]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "949"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.931558"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.931558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:04.965890"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.965890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 951]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 951]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 951]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "951"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:04.970547"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:04.970547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 11:48:04 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:05.001400"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:05.001400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 953]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 953]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 953]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "953"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:05.006078"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:05.006078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:05.010184"], ["updated_at", "2014-10-13 10:48:05.010184"], ["user_email", "example.user.276@digital.justice.gov.uk"], ["value", "d2a8afa9-2a11-4d65-a2fd-6c41f273818a"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/d2a8afa9-2a11-4d65-a2fd-6c41f273818a" for 127.0.0.1 at 2014-10-13 11:48:05 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"d2a8afa9-2a11-4d65-a2fd-6c41f273818a"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'd2a8afa9-2a11-4d65-a2fd-6c41f273818a' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.276@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-276' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:05.017800"], ["email", "example.user.276@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-276"], ["surname", "user"], ["updated_at", "2014-10-13 10:48:05.017800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1083]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1083]] Redirected to http://www.example.com/people/example-user-276/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/example-user-276/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-276"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1083]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-276' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1083) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 43.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0130' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:05.377123"], ["image", "placeholder.png"], ["slug", "surname-0130"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 10:48:05.377123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0131' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:05.769067"], ["image", "placeholder.png"], ["slug", "surname-0131"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 10:48:05.769067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.251546"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 10:48:06.251546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.259281"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:06.259281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1086]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.269358"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 10:48:06.269358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.273157"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.273157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1087]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.282527"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 10:48:06.282527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.285362"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 10:48:06.285362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"1090"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1089]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1090' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1090]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.293775"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 10:48:06.293775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.299230"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.299230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1092"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1091]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1092]] Redirected to http://test.host/people/doe?cache_bust=1413197286 Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.310000"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 10:48:06.310000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.316270"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.316270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1093]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1094]] Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.332252"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.332252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1095]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1095) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.7ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.386213"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:06.386213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1096) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.7ms | ActiveRecord: 1.2ms) Started GET "/people/test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472/edit" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1096) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1096) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1096) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1096 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 10:48:06.466257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472 Completed 302 Found in 13ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1095]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a7dc6a2d-cae9-4980-b385-40fe64eb7472' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1096) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.496715"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.496715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1097]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1097]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1097]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1097) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 56ms (Views: 36.4ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:06.561824"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 10:48:06.561824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:06.565671"], ["updated_at", "2014-10-13 10:48:06.565671"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "a74942aa-eb4a-4d8c-92be-fd2844ec8c7e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/a74942aa-eb4a-4d8c-92be-fd2844ec8c7e?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"a74942aa-eb4a-4d8c-92be-fd2844ec8c7e"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'a74942aa-eb4a-4d8c-92be-fd2844ec8c7e' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 4ms (ActiveRecord: 0.6ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1098]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1098) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.597314"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.597314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1099]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1099) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.641451"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:06.641451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1100) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 0.9ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1100) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1100) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1100) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1100 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 10:48:06.713339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1099]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1100) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.742599"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.742599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1101]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1101]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1101]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1101) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.8ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1101]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 32.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1101]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:48:06.849354"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-8f797306-a41a-4632-99a6-c7c033757160"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:06.849354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-8f797306-a41a-4632-99a6-c7c033757160 Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-8f797306-a41a-4632-99a6-c7c033757160" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8f797306-a41a-4632-99a6-c7c033757160"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1101]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8f797306-a41a-4632-99a6-c7c033757160' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1102) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.878427"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:06.878427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1103]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1103) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:06.922056"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:06.922056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1104) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.9ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1104) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1104) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1104) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1104 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:48:06.997443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:07.008122"], ["updated_at", "2014-10-13 10:48:07.008122"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "34bb662e-c340-4d39-b062-75a3a04dcf3f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 13.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 11:48:07 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade74c92_f3c03fc408865be414999@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/34bb662e-c340-4d39-b062-75a3a04dcf3f?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 39ms (ActiveRecord: 2.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1103]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1104) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.068257"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.068257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1105]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1105]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1105]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1105) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1105]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1105]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:48:07.162084"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:07.162084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1105]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1106) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.189907"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.189907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1107]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1107) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0137' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:07.235145"], ["slug", "surname-0137"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 10:48:07.235145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0137/edit" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0137"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0137' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1108) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 0.9ms) Started DELETE "/people/surname-0137" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0137"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0137' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1108) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1108]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1107]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.314431"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.314431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1109]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 19ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1109) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:07.373306"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-cb3c8b32-1ac8-457c-9678-46e80958e629"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 10:48:07.373306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-cb3c8b32-1ac8-457c-9678-46e80958e629/edit" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-cb3c8b32-1ac8-457c-9678-46e80958e629"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-cb3c8b32-1ac8-457c-9678-46e80958e629' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1110) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 0.9ms) Started DELETE "/people/test-user-cb3c8b32-1ac8-457c-9678-46e80958e629" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-cb3c8b32-1ac8-457c-9678-46e80958e629"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-cb3c8b32-1ac8-457c-9678-46e80958e629' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1110) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1110]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1109]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.450908"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.450908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1111]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1111) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.496000"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:07.496000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1112) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1112) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1112) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1112) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1112 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 10:48:07.569235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:07.584826"], ["updated_at", "2014-10-13 10:48:07.584826"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "faf11684-f60b-471e-89e3-ddf822587b72"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 21.6ms Sent mail to bob.smith@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 11:48:07 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade79122d_f3c03fc408865be415060@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/faf11684-f60b-471e-89e3-ddf822587b72?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 39ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1111]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1112) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.626353"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.626353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1113]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1113) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.670635"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:07.670635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1114) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1114) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.8ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1114) ORDER BY groups.name Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1114) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1114 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:48:07.744721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:07.752031"], ["updated_at", "2014-10-13 10:48:07.752031"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "0fa86d85-ece3-4cdd-a2bd-a58208754631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 12.6ms Sent mail to bob.smithe@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:07 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bade7b9fe9_f3c03fc408865be4151db@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/0fa86d85-ece3-4cdd-a2bd-a58208754631?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:07.770434"], ["updated_at", "2014-10-13 10:48:07.770434"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "c80749c1-4644-401c-8436-a151f6c5e18b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 8.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 11:48:07 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade7bdb4c_f3c03fc408865be41525f@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/c80749c1-4644-401c-8436-a151f6c5e18b?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 48ms (ActiveRecord: 2.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1114) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.807612"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.807612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1115]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1115) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (13.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (16.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 45.0ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.866401"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-4493413f-e839-41fe-ae59-43c661f82a9c"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:07.866401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-4493413f-e839-41fe-ae59-43c661f82a9c" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-4493413f-e839-41fe-ae59-43c661f82a9c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4493413f-e839-41fe-ae59-43c661f82a9c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-4493413f-e839-41fe-ae59-43c661f82a9c/edit" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-4493413f-e839-41fe-ae59-43c661f82a9c"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4493413f-e839-41fe-ae59-43c661f82a9c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-4493413f-e839-41fe-ae59-43c661f82a9c" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-4493413f-e839-41fe-ae59-43c661f82a9c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4493413f-e839-41fe-ae59-43c661f82a9c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1116) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1116) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1116 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 10:48:07.938168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-4493413f-e839-41fe-ae59-43c661f82a9c Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-4493413f-e839-41fe-ae59-43c661f82a9c" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-4493413f-e839-41fe-ae59-43c661f82a9c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4493413f-e839-41fe-ae59-43c661f82a9c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:07.964826"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:07.964826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1117]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1117) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:08.008848"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:08.008848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1118) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 0.9ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1118) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.1ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1118) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1118) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 1118 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 10:48:08.092259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 21ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1117]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1118) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.119071"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.119071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1119]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1119]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1119) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.2ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1119]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1119]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:48:08.218028"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:08.218028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:08.223882"], ["updated_at", "2014-10-13 10:48:08.223882"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "7bccd800-e1b1-4a26-9058-a9fd244352d2"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 11.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:08 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade838ef1_f3c03fc408865be4153be@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/7bccd800-e1b1-4a26-9058-a9fd244352d2?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 26ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1119]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1120) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.265514"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.265514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1121]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1121) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:08.312850"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-d396983f-e4a8-4989-8a14-b9c040a044d2"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 10:48:08.312850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-d396983f-e4a8-4989-8a14-b9c040a044d2/edit" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-d396983f-e4a8-4989-8a14-b9c040a044d2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d396983f-e4a8-4989-8a14-b9c040a044d2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1122) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 47.8ms | ActiveRecord: 1.2ms) Started DELETE "/people/test-user-d396983f-e4a8-4989-8a14-b9c040a044d2" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-d396983f-e4a8-4989-8a14-b9c040a044d2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d396983f-e4a8-4989-8a14-b9c040a044d2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1122) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1122]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1121]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.3ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.406773"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.406773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1123]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1123) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:08.451484"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 10:48:08.451484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1124) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 0.9ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1124) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 7.5ms Sent mail to bob.smith@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 11:48:08 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade87c119_f3c03fc408865be41549a@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1124]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 20ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1123]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.542479"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.542479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1125]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1125) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.0ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.602384"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:08.602384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1126) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1126) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1126 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:48:08.676268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1125]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.703215"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.703215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1127]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1127) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.748474"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-319f73f7-f434-46ae-b557-4506486583ab"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:08.748474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-319f73f7-f434-46ae-b557-4506486583ab" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-319f73f7-f434-46ae-b557-4506486583ab"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-319f73f7-f434-46ae-b557-4506486583ab' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 0.9ms) Started GET "/people/test-user-319f73f7-f434-46ae-b557-4506486583ab/edit" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-319f73f7-f434-46ae-b557-4506486583ab"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-319f73f7-f434-46ae-b557-4506486583ab' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 1.0ms) Started PATCH "/people/test-user-319f73f7-f434-46ae-b557-4506486583ab" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-319f73f7-f434-46ae-b557-4506486583ab"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-319f73f7-f434-46ae-b557-4506486583ab' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1128) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1128) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1128 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 10:48:08.820828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:08.827035"], ["updated_at", "2014-10-13 10:48:08.827035"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "fa582ede-fefe-4e87-915b-ca211835b350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 19.3ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:08 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bade8ce0df_f3c03fc408865be4155af@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/fa582ede-fefe-4e87-915b-ca211835b350?desired_path=%2Fpeople%2Ftest-user-319f73f7-f434-46ae-b557-4506486583ab. Redirected to http://www.example.com/people/test-user-319f73f7-f434-46ae-b557-4506486583ab Completed 302 Found in 38ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-319f73f7-f434-46ae-b557-4506486583ab" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-319f73f7-f434-46ae-b557-4506486583ab"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-319f73f7-f434-46ae-b557-4506486583ab' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:08.877758"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:08.877758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1129]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1129]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1129) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1129]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.2ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1129]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:48:08.972032"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-2a4fd19e-381d-4475-b034-3f62acfbfb4c"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:08.972032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-2a4fd19e-381d-4475-b034-3f62acfbfb4c Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-2a4fd19e-381d-4475-b034-3f62acfbfb4c" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2a4fd19e-381d-4475-b034-3f62acfbfb4c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1129]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2a4fd19e-381d-4475-b034-3f62acfbfb4c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1130) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:09.000810"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:09.000810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1131]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1131) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 0.9ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.046350"], ["email", "test.user"], ["slug", "test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 10:48:09.046350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad/edit" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1132) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.0ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-360e9257-fdeb-4d91-95d3-3e29438fd5ad' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1132) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1132]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1131]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.0ms | ActiveRecord: 0.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 10:48:09.133624"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 10:48:09.133624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1133]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1133]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1133) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1133]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1133]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 10:48:09.231560"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-2decac8c-c309-417c-a7f8-6f5d0e026173"], ["surname", "Smith"], ["updated_at", "2014-10-13 10:48:09.231560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-2decac8c-c309-417c-a7f8-6f5d0e026173 Completed 302 Found in 11ms (ActiveRecord: 1.4ms) Started GET "/people/test-user-2decac8c-c309-417c-a7f8-6f5d0e026173" for 127.0.0.1 at 2014-10-13 11:48:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2decac8c-c309-417c-a7f8-6f5d0e026173"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1133]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2decac8c-c309-417c-a7f8-6f5d0e026173' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1134) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.255020"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 10:48:09.255020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.259190"], ["updated_at", "2014-10-13 10:48:09.259190"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "f079b19e-ee96-4d61-8149-71c5f6bd9c99"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1135]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.7ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade9415ef_f3c03fc408865be4156e1@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/f079b19e-ee96-4d61-8149-71c5f6bd9c99?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.277431"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 10:48:09.277431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.281466"], ["updated_at", "2014-10-13 10:48:09.281466"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "5a3e0119-14e9-478f-9ca3-e9ff1c96b8dc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1136]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.9ms Sent mail to test.user@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade946d4b_f3c03fc408865be415784@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/5a3e0119-14e9-478f-9ca3-e9ff1c96b8dc?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.298722"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 10:48:09.298722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.302902"], ["updated_at", "2014-10-13 10:48:09.302902"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "6094c1dc-64a0-4cf9-a87f-99c3ceb94cd2"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1137]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 20.0ms Sent mail to test.user@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade94e48a_f3c03fc408865be415861@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/6094c1dc-64a0-4cf9-a87f-99c3ceb94cd2?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.328822"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 10:48:09.328822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.333281"], ["updated_at", "2014-10-13 10:48:09.333281"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "8d7455e1-a1e3-4f25-a0e7-6944515fd183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1138]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 11.6ms Sent mail to test.user@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade953a0e_f3c03fc408865be41598f@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/8d7455e1-a1e3-4f25-a0e7-6944515fd183?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.350676"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 10:48:09.350676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.354787"], ["updated_at", "2014-10-13 10:48:09.354787"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "7e571607-a191-4b65-b375-230db3796655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1139]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.2ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bade958965_f3c03fc408865be4160f7@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/7e571607-a191-4b65-b375-230db3796655?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.371158"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 10:48:09.371158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.373643"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 10:48:09.373643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1141], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1140]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to recipient@example.com (4.8ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bade95d131_f3c03fc408865be416125@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.389850"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 10:48:09.389850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.392533"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 10:48:09.392533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1143], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1142]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.4ms Sent mail to recipient@example.com (4.4ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bade961ab0_f3c03fc408865be41621b@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.409990"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 10:48:09.409990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.413081"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 10:48:09.413081"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1145], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1144]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.4ms Sent mail to recipient@example.com (4.7ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bade966b05_f3c03fc408865be416392@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.428860"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 10:48:09.428860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.431931"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 10:48:09.431931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1147], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1146]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.4ms Sent mail to recipient@example.com (4.6ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bade96c9b5_f3c03fc408865be416487@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.453040"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 10:48:09.453040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.455807"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 10:48:09.455807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1149], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1148]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.9ms Sent mail to recipient@example.com (4.9ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bade9714d8_f3c03fc408865be4165be@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.472183"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 10:48:09.472183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1150]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.480362"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 10:48:09.480362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1151]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.488672"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 10:48:09.488672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0077", "team_email_address"=>"example.user.278@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1152]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.495116"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.495116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0077 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.500192"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 10:48:09.500192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0078", "team_email_address"=>"example.user.279@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1153]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.507195"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.507195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0078 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.512564"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 10:48:09.512564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0079", "team_email_address"=>"example.user.280@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1154]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.518583"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.518583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0079 Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.524592"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 10:48:09.524592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1155]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.534378"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 10:48:09.534378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1156]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.543904"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 10:48:09.543904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1157]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.553890"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 10:48:09.553890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.562875"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.562875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 959]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 959]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 959]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "959"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.568811"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.568811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0080", "team_email_address"=>"example.user.281@digital.justice.gov.uk"}, "id"=>"group-0080"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1158]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0080' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (960) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0080' AND "groups"."id" != 960) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0080 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.581317"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 10:48:09.581317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.602171"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.602171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0081-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "961"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.606781"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.606781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0082", "team_email_address"=>"example.user.285@digital.justice.gov.uk"}, "id"=>"group-0081"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1159]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0081' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (962) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 961]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 962) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0082' AND "groups"."id" != 962) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 962 [["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.618361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0082 Completed 302 Found in 10ms (ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 962]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.623663"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 10:48:09.623663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.630820"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.630820"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 963]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 963]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 963]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "963"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.635432"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.635432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0083", "team_email_address"=>"example.user.286@digital.justice.gov.uk"}, "id"=>"group-0083"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1160]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0083' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (964) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0083' AND "groups"."id" != 964) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0083 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.647707"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 10:48:09.647707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.654924"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.654924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "965"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.659776"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.659776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0084"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1161]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0084' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (966) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 965]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 966) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 966) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.675740"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 10:48:09.675740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.683131"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.683131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "967"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.687702"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.687702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0085"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1162]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0085' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (968) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 967]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 968) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 968) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.702964"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 10:48:09.702964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.711051"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.711051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "969"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.716572"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.716572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0086"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1163]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0086' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (970) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 969]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 970) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 970) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.732414"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 10:48:09.732414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.742361"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.742361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 971]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 971]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 971]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "971"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.747228"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.747228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0087"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1164]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0087' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (972) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 971]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 971]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '971/972/%' OR "groups"."ancestry" = '971/972')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '971/972' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 972]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.760984"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 10:48:09.760984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.764616"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.764616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 973]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 973]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 973]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "973"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.769656"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.769656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1165]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0089' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (974) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 973]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 973]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '973/974/%' OR "groups"."ancestry" = '973/974')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '973/974' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 974]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0088 Completed 302 Found in 8ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.782689"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 10:48:09.782689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.789759"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.789759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 975]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "975"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.794244"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.794244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0090"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1166]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0090' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (976) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.804751"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 10:48:09.804751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.810729"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.810729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1167]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.818278"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 10:48:09.818278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1168]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.825776"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 10:48:09.825776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.832034"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.832034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 978]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 978]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 978]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "978"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.836986"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.836986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1169]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.844276"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 10:48:09.844276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.853079"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.853079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 980]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 980]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 980]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "980"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.859082"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.859082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0092"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1170]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0092' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (981) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.870041"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 10:48:09.870041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.872595"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 10:48:09.872595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1171]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1172]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.880393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 10:48:09.880393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.882816"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 10:48:09.882816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1174"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1173]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1174' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1174]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.890288"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 10:48:09.890288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.892707"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 10:48:09.892707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1176"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1175]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1176]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.900402"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 10:48:09.900402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.903216"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 10:48:09.903216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.910451"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.910451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 982]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 982]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 982]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "982"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.915119"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.915119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.917456"], ["group_id", 983], ["person_id", 1178], ["updated_at", "2014-10-13 10:48:09.917456"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1178]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:09.919097' WHERE "people"."id" = 1178 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:09.919810' WHERE "groups"."id" = 983  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1178"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1177]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1178' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1178]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1178]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1177], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.305@digital.justice.gov.uk"], ["subject_id", 1178]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.0ms Sent mail to example.user.305@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: example.user.305@digital.justice.gov.uk Message-ID: <543bade9e3a44_f3c03fc408865be41663d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0174 has said that they believe the information on Surname-0175 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.940710"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 10:48:09.940710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.943274"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 10:48:09.943274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.949915"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.949915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 984]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 984]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 984]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "984"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.954250"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.954250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.956195"], ["group_id", 985], ["person_id", 1180], ["updated_at", "2014-10-13 10:48:09.956195"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1180]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:09.957534' WHERE "people"."id" = 1180 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:09.958203' WHERE "groups"."id" = 985  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1180"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1179]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1180]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1180]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1179], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.307@digital.justice.gov.uk"], ["subject_id", 1180]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.7ms Sent mail to example.user.307@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 11:48:09 +0100 From: support@example.com To: example.user.307@digital.justice.gov.uk Message-ID: <543bade9ececf_f3c03fc408865be4167ba@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0176 has said that they believe the information on Surname-0177 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1180]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.979973"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 10:48:09.979973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.982354"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 10:48:09.982354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:09.988708"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.988708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 986]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 986]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 986]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "986"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:09.993155"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:09.993155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:09.995235"], ["group_id", 987], ["person_id", 1182], ["updated_at", "2014-10-13 10:48:09.995235"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1182]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:09.996663' WHERE "people"."id" = 1182 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:09.997320' WHERE "groups"."id" = 987  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1182"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1181]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1182' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1182]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1182]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1181], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.309@digital.justice.gov.uk"], ["subject_id", 1182]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.8ms Sent mail to example.user.309@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 11:48:10 +0100 From: support@example.com To: example.user.309@digital.justice.gov.uk Message-ID: <543badea23ab_f3c03fc408865be4168c0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0178 has said that they believe the information on Surname-0179 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.018241"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 10:48:10.018241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.020594"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 10:48:10.020594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.027656"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:10.027656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 988]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 988]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 988]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "988"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:10.032148"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:10.032148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:10.034089"], ["group_id", 989], ["person_id", 1184], ["updated_at", "2014-10-13 10:48:10.034089"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1184]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:10.035456' WHERE "people"."id" = 1184 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:10.036108' WHERE "groups"."id" = 989  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1184"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1183]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1184' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1184]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1184]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1183], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.311@digital.justice.gov.uk"], ["subject_id", 1184]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.7ms Sent mail to example.user.311@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 11:48:10 +0100 From: support@example.com To: example.user.311@digital.justice.gov.uk Message-ID: <543badeabc48_f3c03fc408865be416991@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0180 has said that they believe the information on Surname-0181 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.056339"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 10:48:10.056339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.058775"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 10:48:10.058775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.065675"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:10.065675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 990]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 990]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 990]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "990"], ["ancestry_depth", 1], ["created_at", "2014-10-13 10:48:10.070435"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 10:48:10.070435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 10:48:10.072445"], ["group_id", 991], ["person_id", 1186], ["updated_at", "2014-10-13 10:48:10.072445"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1186]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 10:48:10.073742' WHERE "people"."id" = 1186 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 10:48:10.074357' WHERE "groups"."id" = 991  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1186"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1185]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1186' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1186]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1186]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1185], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.313@digital.justice.gov.uk"], ["subject_id", 1186]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.7ms Sent mail to example.user.313@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 11:48:10 +0100 From: support@example.com To: example.user.313@digital.justice.gov.uk Message-ID: <543badea150f7_f3c03fc408865be41705d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0182 has said that they believe the information on Surname-0183 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 15ms (ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.094847"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 10:48:10.094847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 10:48:10.097163"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 10:48:10.097163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"1188"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1187]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1188' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1188]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1188]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) BEGIN Peoplefinder::Group Load (0.9ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:05.949758"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:05.949758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 992]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 992]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 992]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "992"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:05.958772"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:05.958772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:05 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:05 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (32.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (37.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (230.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (39.5ms) Completed 200 OK in 320ms (Views: 318.1ms | ActiveRecord: 1.7ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/tokens/new.html.haml within layouts/peoplefinder/application (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 12ms (Views: 7.6ms | ActiveRecord: 0.2ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.340745"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.340745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 994]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 994]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 994]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "994"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.345628"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.345628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.360801"], ["updated_at", "2014-10-13 12:39:06.360801"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "624c8cb1-af89-4e92-acbf-0ac7f5b891f4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/624c8cb1-af89-4e92-acbf-0ac7f5b891f4" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"624c8cb1-af89-4e92-acbf-0ac7f5b891f4"} Peoplefinder::Token Load (0.6ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '624c8cb1-af89-4e92-acbf-0ac7f5b891f4' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:06.379363"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 12:39:06.379363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1189]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1189]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 39ms (ActiveRecord: 3.8ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1189]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1189) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (44.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (53.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 78ms (Views: 60.8ms | ActiveRecord: 2.5ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.515520"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.515520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 996]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 996]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 996]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "996"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.520561"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.520561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.538302"], ["updated_at", "2014-10-13 12:39:06.538302"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "f444be05-d6ba-4431-a32f-6f866246f1b6"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/token_mailer/new_token_email.text.erb (0.7ms) Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 14.1ms Sent mail to james.darling@digital.justice.gov.uk (8.0ms) Date: Mon, 13 Oct 2014 13:39:06 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bc7ea88831_fad33fcebd465bec3983@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/f444be05-d6ba-4431-a32f-6f866246f1b6 If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/tokens/create.html.haml within layouts/peoplefinder/application (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 35ms (Views: 5.7ms | ActiveRecord: 0.5ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.581567"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.581567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 998]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 998]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 998]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "998"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.589020"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.589020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/tokens/new.html.haml within layouts/peoplefinder/application (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.624148"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.624148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1000]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1000]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1000]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1000"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.628680"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.628680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.631498"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 12:39:06.631498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.635567"], ["updated_at", "2014-10-13 12:39:06.635567"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "bec906fe-a9c4-4d2a-bc11-d8ac60d44dd1"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/bec906fe-a9c4-4d2a-bc11-d8ac60d44dd1" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"bec906fe-a9c4-4d2a-bc11-d8ac60d44dd1"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'bec906fe-a9c4-4d2a-bc11-d8ac60d44dd1' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1190]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1190]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1190]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1190) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.1ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.696667"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.696667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1002]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1002]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1002]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1002"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.701455"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.701455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.705315"], ["updated_at", "2014-10-13 12:39:06.705315"], ["user_email", "example.user.13@digital.justice.gov.uk"], ["value", "2545f08c-fd95-4d5b-a1aa-26888c1b765b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/2545f08c-fd95-4d5b-a1aa-26888c1b765b" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"2545f08c-fd95-4d5b-a1aa-26888c1b765b"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '2545f08c-fd95-4d5b-a1aa-26888c1b765b' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.13@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-13' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:06.712841"], ["email", "example.user.13@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-13"], ["surname", "user"], ["updated_at", "2014-10-13 12:39:06.712841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1191]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1191]] Redirected to http://www.example.com/people/example-user-13/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.9ms) Started GET "/people/example-user-13/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-13"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1191]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-13' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1191) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (37.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.4ms) Completed 200 OK in 49ms (Views: 43.9ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.780782"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.780782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1004]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1004]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1004]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1004"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:06.787149"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:06.787149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.790250"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 12:39:06.790250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.794788"], ["updated_at", "2014-10-13 12:39:06.794788"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d2f536a4-c4dc-405f-bee9-1310e0a40399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1192]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/reminder_mailer/inadequate_profile.text.erb (2.5ms) Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 14.3ms Sent mail to test.user@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 13:39:06 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7eac5018_fad33fcebd465bec40ec@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d2f536a4-c4dc-405f-bee9-1310e0a40399?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/d2f536a4-c4dc-405f-bee9-1310e0a40399?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"d2f536a4-c4dc-405f-bee9-1310e0a40399"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'd2f536a4-c4dc-405f-bee9-1310e0a40399' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.8ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1192]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1192) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 41ms (Views: 36.4ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.867525"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 12:39:06.867525"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.871251"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 12:39:06.871251"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:06.874616"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 12:39:06.874616"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 1195 [["updated_at", "2014-10-13 12:39:06.875911"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:06.886572"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:06.886572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1196]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1196) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 39ms (Views: 34.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:06.934745"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 12:39:06.934745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1197) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 13:39:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1197) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 1197) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1197 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 12:39:06.995600"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:07.008011"], ["event", "update"], ["item_id", 1197], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1197\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 12:39:06.934745000 Z\nupdated_at: 2014-10-13 12:39:06.934745000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 24ms (ActiveRecord: 4.0ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1197) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (9.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 22ms (Views: 17.1ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]]  (0.6ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.6ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1197]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (16.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 25ms (Views: 20.8ms | ActiveRecord: 1.6ms) Started POST "/audit_trail/undo/108" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"108"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 108]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1197]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1197) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1197 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 12:39:07.077337"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:07.080731"], ["event", "update"], ["item_id", 1197], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1197\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 12:39:06.934745000 Z\nupdated_at: 2014-10-13 12:39:06.995600000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 12ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1196]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1197]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1197]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 11ms (Views: 9.4ms | ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1197]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.109778"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:07.109778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1198]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1198) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.4ms) Completed 200 OK in 54ms (Views: 36.2ms | ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:07.176145"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:07.176145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1006"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:07.181516"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:07.181516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1007) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1006, 1007) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1006) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (14.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1006/1007' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/edit.html.haml within layouts/peoplefinder/application (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 36ms (Views: 28.0ms | ActiveRecord: 2.5ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1007) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1006]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1006/1007/%' OR "groups"."ancestry" = '1006/1007')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1006/1007' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1007]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.237481"], ["event", "destroy"], ["item_id", 1007], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1007\nname: original name\ncreated_at: 2014-10-13 12:39:07.181516000 Z\nupdated_at: 2014-10-13 12:39:07.181516000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '1006'\nancestry_depth: 1\nteam_email_address: example.user.16@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1007], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 16ms (ActiveRecord: 3.0ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1006) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1006) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1006]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1006' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1006' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1006]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/show.html.haml within layouts/peoplefinder/application (20.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 31ms (Views: 24.7ms | ActiveRecord: 2.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1198]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1007]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.301629"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:07.301629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1199]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1199) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:07.354332"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:07.354332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1008]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1008]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1008]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1008"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:07.359345"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:07.359345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:07.362098"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 12:39:07.362098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.364193"], ["group_id", 1009], ["leader", "t"], ["person_id", 1200], ["role", "Jefe"], ["updated_at", "2014-10-13 12:39:07.364193"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1200]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:07.366210' WHERE "people"."id" = 1200 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:07.366986' WHERE "groups"."id" = 1009  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1200) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1008, 1009) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1008, 1009) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1200]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (32.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 44ms (Views: 38.2ms | ActiveRecord: 1.8ms) Started DELETE "/memberships/194?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"194"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 194]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 194]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.425029"], ["event", "destroy"], ["item_id", 194], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 194\ngroup_id: 1009\nperson_id: 1200\nrole: Jefe\ncreated_at: 2014-10-13 12:39:07.364193000 Z\nupdated_at: 2014-10-13 12:39:07.364193000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 194], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1200]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:07.428858' WHERE "people"."id" = 1200 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1009]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:07.430429' WHERE "groups"."id" = 1009  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 11ms (ActiveRecord: 2.1ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1200) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1199]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 194]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1200]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1009]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (14.3ms) Completed 200 OK in 26ms (Views: 23.3ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.514852"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:07.514852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1201]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1201) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 36ms (Views: 32.8ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:07.614074"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:07.614074"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.617719"], ["event", "create"], ["item_id", 1202], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 12ms (ActiveRecord: 1.6ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1202) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1202]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/112" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"112"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 112]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1202]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1202]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1202]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.662797"], ["event", "destroy"], ["item_id", 1202], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1202\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 12:39:07.614074000 Z\nupdated_at: 2014-10-13 12:39:07.614074000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1202], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1201]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1202]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1202]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 9.7ms | ActiveRecord: 1.2ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.690301"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:07.690301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1203]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1203) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.9ms) Completed 200 OK in 42ms (Views: 35.3ms | ActiveRecord: 1.5ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:07.741733"], ["slug", "surname-0005"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 12:39:07.741733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0005/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0005"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1204) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (31.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 44ms (Views: 38.1ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0005" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0005", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0005"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1204) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0005' AND "people"."given_name" = '' AND ("people"."id" != 1204) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1204]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 1204 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:07.810545"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:07.818937"], ["event", "update"], ["item_id", 1204], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1204\ngiven_name: \nsurname: Surname-0005\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 12:39:07.741733000 Z\nupdated_at: 2014-10-13 12:39:07.741733000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1204\n given_name: ''\n surname: Surname-0005\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 12:39:07.810545000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0005\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1204\n given_name: ''\n surname: Surname-0005\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 12:39:07.741733000 Z\n updated_at: &2 2014-10-13 12:39:07.810545000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0005\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1204\n given_name: ''\n surname: Surname-0005\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0005\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70157265750220\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1204\n given_name: ''\n surname: Surname-0005\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0005\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413203947-64211-0899\n cache_id: 1413203947-64211-0899\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413203947-64211-0899/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70157265771060\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1204\n given_name: ''\n surname: Surname-0005\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0005\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413203947-64211-0899\n cache_id: 1413203947-64211-0899\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413203947-64211-0899/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413203947-64211-0899\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413203947-64211-0899/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0005/image/edit Completed 302 Found in 26ms (ActiveRecord: 3.1ms) Started GET "/people/surname-0005/image/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0005"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/person_image/edit.html.haml within layouts/peoplefinder/application (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 18ms (Views: 15.1ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1203]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1204]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.885671"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:07.885671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1205]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1205) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:07.935142"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 12:39:07.935142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1206) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1206) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1206]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.989699"], ["event", "destroy"], ["item_id", 1206], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1206\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 12:39:07.935142000 Z\nupdated_at: 2014-10-13 12:39:07.935142000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1206], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:07 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (7.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 16ms (Views: 12.7ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:08 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1206]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 10ms (Views: 7.9ms | ActiveRecord: 0.9ms)  (0.2ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/115" for 127.0.0.1 at 2014-10-13 13:39:08 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"115"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 115]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1206]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1206) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:07.935142"], ["given_name", "Greg"], ["id", 1206], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 12:39:08.039429"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:08.041643"], ["event", "create"], ["item_id", 1206], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:08 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1205]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1206]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1206]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:09.150345"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:09.150345"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:09.153271"], ["event", "create"], ["item_id", 1010], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.21@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1010]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1010]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1010]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1010"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:09.159492"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:09.159492"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:09.161715"], ["event", "create"], ["item_id", 1011], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.20@digital.justice.gov.uk\nancestry:\n- \n- '1010'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:09.164531"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 12:39:09.164531"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:09.166217"], ["event", "create"], ["item_id", 1207], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:09.664251"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:09.664251"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:09.667225"], ["event", "create"], ["item_id", 1208], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1208]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 12ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1208) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (19.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (42.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (47.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 59ms (Views: 53.4ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1207) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 47ms (Views: 39.9ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 13:39:09 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"1011", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1207) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 1207) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1207 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:09.986960"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:09.991172"], ["event", "update"], ["item_id", 1207], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1207\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 12:39:09.164531000 Z\nupdated_at: 2014-10-13 12:39:09.164531000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:09.992124"], ["group_id", 1011], ["person_id", 1207], ["role", "Jefe"], ["updated_at", "2014-10-13 12:39:09.992124"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:09.993833"], ["event", "create"], ["item_id", 195], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 1011\nperson_id:\n- \n- 1207\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1207]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:09.995367' WHERE "people"."id" = 1207 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1011]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:09.996830' WHERE "groups"."id" = 1011  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/bob Completed 302 Found in 21ms (ActiveRecord: 3.3ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1207) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1010, 1011) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1010, 1011) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 18ms (Views: 12.7ms | ActiveRecord: 1.4ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 195]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1207]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1011]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1207]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1208]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1207]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1011]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1010]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (13.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 20ms (Views: 17.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.181519"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.181519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1209]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1209) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 42ms (Views: 36.6ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:10.259358"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 12:39:10.259358"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.261552"], ["event", "create"], ["item_id", 1012], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1012) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1012) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1012]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1012' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1012' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1012]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/show.html.haml within layouts/peoplefinder/application (7.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 2.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1209]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1012]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 9ms (Views: 7.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.307303"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.307303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1210]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1210) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (39.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 50ms (Views: 45.2ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:10.371565"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:10.371565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1013"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:10.377996"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:10.377996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1014) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1013, 1014) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1013) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1013/1014' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/edit.html.haml within layouts/peoplefinder/application (16.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 28ms (Views: 19.8ms | ActiveRecord: 2.6ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"1013", "team_email_address"=>"example.user.22@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1014) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1013]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1014) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 1014) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1014 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 12:39:10.426277"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:10.429541"], ["event", "update"], ["item_id", 1014], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1014\nname: original name\ncreated_at: 2014-10-13 12:39:10.377996000 Z\nupdated_at: 2014-10-13 12:39:10.377996000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '1013'\nancestry_depth: 1\nteam_email_address: example.user.22@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 17ms (ActiveRecord: 3.0ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1014) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1013, 1014) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1014]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1013/1014' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1013/1014' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1014]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/show.html.haml within layouts/peoplefinder/application (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1210]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1014]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/index.html.haml within layouts/peoplefinder/application (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.474123"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.474123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:10.479558"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 12:39:10.479558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.490830"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 12:39:10.490830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.494682"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 12:39:10.494682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.510769"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.510769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1215]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1215]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1215]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1215) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 39ms (Views: 32.2ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1215]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 34ms (Views: 32.0ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1215]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:10.609191"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-6e538333-aa36-4650-8ec0-831a40b8a3a9"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:10.609191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-6e538333-aa36-4650-8ec0-831a40b8a3a9 Completed 302 Found in 11ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-6e538333-aa36-4650-8ec0-831a40b8a3a9" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-6e538333-aa36-4650-8ec0-831a40b8a3a9"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1215]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-6e538333-aa36-4650-8ec0-831a40b8a3a9' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1216) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.640191"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.640191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1217]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1217) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (31.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 45ms (Views: 39.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:10.692828"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 12:39:10.692828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677/edit" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1218) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (35.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 47ms (Views: 41.8ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d20e0f4e-8c04-445e-9d1c-7a331fd56677' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1218) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1218]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1217]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (8.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 16ms (Views: 13.8ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (1.0ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.786334"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.786334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1219]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 2.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1219) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.834431"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:10.834431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1220) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1220) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1220) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1220) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1220 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:10.913875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:10.924579"], ["updated_at", "2014-10-13 12:39:10.924579"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d1830260-c27d-4a21-ab5c-8b094df67377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_from_email.erb (1.5ms) Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 15.3ms Sent mail to bob.smith@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 13:39:10 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7eee4f73_fad33fcebd465bec4134@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/d1830260-c27d-4a21-ab5c-8b094df67377?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 39ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1219]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1220) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 9.1ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:10.975719"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:10.975719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1221]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1221) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:11.024003"], ["email", "test.user"], ["slug", "test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 12:39:11.024003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590/edit" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1222) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (43.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 54ms (Views: 49.3ms | ActiveRecord: 0.9ms) Started DELETE "/people/test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-750ef654-93b3-45a6-9c19-93c2f2ae6590' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1222) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1222]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1221]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (7.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 15ms (Views: 12.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.126094"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.126094"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1223]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1223) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.174570"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:11.174570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1224) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.2ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1224) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 32.3ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1224) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1224) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1224 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:11.257109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:11.264682"], ["updated_at", "2014-10-13 12:39:11.264682"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "550fb648-34cd-4cdb-9af6-f7e71f9f2bbc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_to_email.erb (0.7ms) Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 13.6ms Sent mail to bob.smithe@digital.justice.gov.uk (6.7ms) Date: Mon, 13 Oct 2014 13:39:11 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bc7ef433b5_fad33fcebd465bec4279@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/550fb648-34cd-4cdb-9af6-f7e71f9f2bbc?desired_path=%2Fpeople%2Fbob-smith.  (0.3ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:11.288305"], ["updated_at", "2014-10-13 12:39:11.288305"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "fb15652b-5dd2-4752-b2ce-9023969a9db1"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_from_email.erb (0.3ms) Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 10.8ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 13:39:11 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7ef48391_fad33fcebd465bec43ef@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/fb15652b-5dd2-4752-b2ce-9023969a9db1?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 57ms (ActiveRecord: 3.1ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1223]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1224) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.329799"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.329799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1225]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1225) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.378740"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:11.378740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a/edit" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (14.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (41.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 56ms (Views: 48.3ms | ActiveRecord: 1.3ms) Started PATCH "/people/test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1226) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1226) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1226 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:11.474476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:11.480292"], ["updated_at", "2014-10-13 12:39:11.480292"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "d067b0c3-d3fc-46ed-8576-4f0a53e29e4d"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_to_email.erb (0.3ms) Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 9.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 13:39:11 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7ef77147_fad33fcebd465bec4424@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/d067b0c3-d3fc-46ed-8576-4f0a53e29e4d?desired_path=%2Fpeople%2Ftest-user-44cdcf85-09cb-43ac-9f30-492c6854d53a. Redirected to http://www.example.com/people/test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a Completed 302 Found in 32ms (ActiveRecord: 2.5ms) Started GET "/people/test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1225]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-44cdcf85-09cb-43ac-9f30-492c6854d53a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.525583"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.525583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1227]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1227) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:11.574386"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 12:39:11.574386"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36/edit" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1228) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-871e1ff2-7b48-4c8b-bcbd-396519bcec36' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1228) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1228]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1227]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.658127"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.658127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1229]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1229) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.5ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.708135"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:11.708135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1230) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1230) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (14.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (37.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 50ms (Views: 43.9ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1230) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1230) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1230 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 12:39:11.798322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1229]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1230) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.830294"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.830294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1231]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1231]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1231) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1231]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 34ms (Views: 31.7ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1231]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:11.931735"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:11.931735"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1231]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1232) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:11.960673"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:11.960673"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1233]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1233) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.010124"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:12.010124"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1234) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 16ms (Views: 9.4ms | ActiveRecord: 1.3ms) Started GET "/people/test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d/edit" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1234) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 42ms (Views: 34.8ms | ActiveRecord: 1.3ms) Started PATCH "/people/test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1234) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1234) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1234 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 12:39:12.104680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d Completed 302 Found in 21ms (ActiveRecord: 2.0ms) Started GET "/people/test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1233]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2bdf8cba-839c-4bad-b7a8-e38b8bc4040d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1234) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.133056"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.133056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1235]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1235) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:12.182300"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 12:39:12.182300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1236) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 41ms (Views: 34.4ms | ActiveRecord: 1.3ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1236) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/deleted_profile_email.erb (0.4ms) Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 7.9ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 13:39:12 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7f03ccf0_fad33fcebd465bec45e1@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1236]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 23ms (ActiveRecord: 2.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1235]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (8.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 12.9ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.287400"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.287400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1237]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1237) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (30.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 43ms (Views: 37.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0010' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:12.338981"], ["slug", "surname-0010"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 12:39:12.338981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0010/edit" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0010"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0010' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1238) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0010" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0010"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0010' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1238) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1238]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1237]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (7.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 15ms (Views: 12.5ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.421681"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.421681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1239]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1239]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 21ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1239]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1239) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1239]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 35ms (Views: 31.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1239]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:12.538233"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:12.538233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:12.543934"], ["updated_at", "2014-10-13 12:39:12.543934"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "198ec039-4024-4198-bbab-c74bafadb3f4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/new_profile_email.erb (0.9ms) Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 12.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 13:39:12 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7f0873c4_fad33fcebd465bec46b1@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/198ec039-4024-4198-bbab-c74bafadb3f4?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 29ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1239]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1240) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 16ms (Views: 9.2ms | ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.591595"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.591595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1241]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1241) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.7ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.1ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.641475"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:12.641475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1242) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 17ms (Views: 9.6ms | ActiveRecord: 1.4ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Person Load (0.9ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1242) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 43ms (Views: 36.7ms | ActiveRecord: 1.7ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1242) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1242) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1242 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 12:39:12.726336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:12.733399"], ["updated_at", "2014-10-13 12:39:12.733399"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "6de25af3-93e4-4581-a4e8-a0ba813972dd"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_profile_email.erb (0.7ms) Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 13.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 13:39:12 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bc7f0b5970_fad33fcebd465bec471b@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/6de25af3-93e4-4581-a4e8-a0ba813972dd?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 32ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1241]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1242) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (11.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 26ms (Views: 20.6ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.790072"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.790072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1243]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1243]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1243]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1243) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:12.840468"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 12:39:12.840468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:12.844035"], ["updated_at", "2014-10-13 12:39:12.844035"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "8cb3ee2c-ab9d-4ff7-bfff-5c26ed0178f1"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/8cb3ee2c-ab9d-4ff7-bfff-5c26ed0178f1?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"8cb3ee2c-ab9d-4ff7-bfff-5c26ed0178f1"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '8cb3ee2c-ab9d-4ff7-bfff-5c26ed0178f1' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 5ms (ActiveRecord: 0.8ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1244]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1244) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.5ms) Completed 200 OK in 15ms (Views: 9.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:12.880646"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:12.880646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1245]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1245]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1245) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 41ms (Views: 35.3ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1245]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1245]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:12.985403"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-e273ac2f-d887-4039-8082-4f53365975f3"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:12.985403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e273ac2f-d887-4039-8082-4f53365975f3 Completed 302 Found in 11ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-e273ac2f-d887-4039-8082-4f53365975f3" for 127.0.0.1 at 2014-10-13 13:39:12 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e273ac2f-d887-4039-8082-4f53365975f3"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e273ac2f-d887-4039-8082-4f53365975f3' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1246) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 10.0ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.016452"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.016452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1247]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1247) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.066752"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:13.066752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1248) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1248) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (14.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (38.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.7ms) Completed 200 OK in 51ms (Views: 46.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1248) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1248) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 1248 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 12:39:13.157964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1247]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1248) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.9ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.193655"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.193655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1249]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1249) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.240909"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:13.240909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1250) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 1.7ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1250) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.1ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1250) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1250) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1250 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:13.327816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1249]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1250) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.356963"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.356963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1251]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1251) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.7ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.406307"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:13.406307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1252) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b/edit" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1252) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (37.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 48ms (Views: 43.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1252) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1252) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1252 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 12:39:13.495223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1251]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-42dd3775-c264-46b4-b7ad-fd929e35cd7b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1252) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:13.527021"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.527021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1253]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1253]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1253]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1253) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 41ms (Views: 34.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1253]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 34ms (Views: 31.7ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1253]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:13.631151"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-0321d4b1-756d-4261-a0b7-abb4311a29e7"], ["surname", "Smith"], ["updated_at", "2014-10-13 12:39:13.631151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-0321d4b1-756d-4261-a0b7-abb4311a29e7 Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-0321d4b1-756d-4261-a0b7-abb4311a29e7" for 127.0.0.1 at 2014-10-13 13:39:13 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-0321d4b1-756d-4261-a0b7-abb4311a29e7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1253]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0321d4b1-756d-4261-a0b7-abb4311a29e7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1254) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 15ms (Views: 9.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.657870"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 12:39:13.657870"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.660651"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.660651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1255]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.672745"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 12:39:13.672745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.675479"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 12:39:13.675479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"1258"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1257]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1258' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1258]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.683750"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 12:39:13.683750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.695441"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.695441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1260"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1259]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1260' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1260]] Redirected to http://test.host/people/doe?cache_bust=1413203953 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.707125"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 12:39:13.707125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.711880"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:13.711880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1262"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1261]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1262' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1262]] Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.726296"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.726296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1015]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1015]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1015]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1015"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.731308"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.731308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.744066"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.744066"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1017) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.753041"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.753041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1018]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1018]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1018]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1018"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.759147"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.759147"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1019]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1019]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1019]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1018/1019"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:13.765441"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.765441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1020]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1020]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1020]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1018/1019/1020"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:13.773146"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.773146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1018, 1019, 1020, 1021) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.781326"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.781326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1022]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1022]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1022]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1022"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.786953"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.786953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1023]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1023]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1023]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0015-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1022/1023"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:13.793622"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.793622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1024]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1024]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1024]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1022/1023/1024"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:13.798691"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.798691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0014' AND "groups"."id" != 1023) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.807627"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.807627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1026]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1026]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1026]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1026"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.812591"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.812591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1026/1027' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1027]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.824985"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.824985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1028]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1028]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1028]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1028"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.844277"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.844277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1029]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1029]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1029]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1028/1029"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:13.849518"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.849518"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1029]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1028/1029' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.860783"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.860783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1031]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1031]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1031]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1031"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.865928"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.865928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:13.870163"], ["slug", "surname-0015"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 12:39:13.870163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:13.872113"], ["group_id", 1032], ["person_id", 1263], ["updated_at", "2014-10-13 12:39:13.872113"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:13.873089' WHERE "people"."id" = 1263 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1032]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:13.874643' WHERE "groups"."id" = 1032  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1031/1032' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1032]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.887232"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.887232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1033]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1033]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1033]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1033"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.892504"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.892504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:13.895891"], ["slug", "surname-0016"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 12:39:13.895891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:13.897469"], ["group_id", 1034], ["person_id", 1264], ["updated_at", "2014-10-13 12:39:13.897469"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:13.898174' WHERE "people"."id" = 1264 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1034]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:13.899527' WHERE "groups"."id" = 1034  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1033/1034' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1034]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.912742"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.912742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1035]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1035]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1035]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1035"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.917342"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.917342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1035/1036' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.925281"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.925281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1037]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1037]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1037]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1037"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.930919"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.930919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1037/1038' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.940009"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.940009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1039]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1039]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1039]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1039"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.944823"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.944823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1039/1040/%' OR "groups"."ancestry" = '1039/1040'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.954643"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.954643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1041]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1041]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1041]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1041"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.959092"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.959092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1041/1042/%' OR "groups"."ancestry" = '1041/1042')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1042]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1042]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.972538"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.972538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:13.980692"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.980692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1044"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:13.988412"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:13.988412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1044]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.000898"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.000898"]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1046]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1046]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1046]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1046"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.007142"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.007142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.014694"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.014694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1048"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.020470"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.020470"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1048]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1049) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 1049) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 1049 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 12:39:14.025239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1049]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.033381"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.033381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1050"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.039080"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.039080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1050) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1050 [["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.042045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1050]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1050"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.047659"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.047659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.056383"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.056383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1053"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.060888"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.060888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1053) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1053 [["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.064021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1053"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.070938"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.070938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1053) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1053 [["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.074233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1053]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1053"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.079973"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.079973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.087672"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.087672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1057]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1057]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1057]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1057"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.092729"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.092729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.096107"], ["slug", "surname-0017"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 12:39:14.096107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.097944"], ["group_id", 1058], ["leader", "t"], ["person_id", 1265], ["updated_at", "2014-10-13 12:39:14.097944"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.098801' WHERE "people"."id" = 1265 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.099469' WHERE "groups"."id" = 1058  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 1058]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.109064"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.109064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1059]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1059]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1059]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1059"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.113710"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.113710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.116976"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 12:39:14.116976"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.120737"], ["group_id", 1060], ["person_id", 1266], ["updated_at", "2014-10-13 12:39:14.120737"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.121700' WHERE "people"."id" = 1266 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1060]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.123487' WHERE "groups"."id" = 1060  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1060 OR "groups"."ancestry" ILIKE '1059/1060/%') OR "groups"."ancestry" = '1059/1060')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.3ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1060) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.136471"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.136471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1061]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1061]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1061]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1061"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.141443"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.141443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.144753"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 12:39:14.144753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.146678"], ["group_id", 1062], ["person_id", 1267], ["updated_at", "2014-10-13 12:39:14.146678"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.147330' WHERE "people"."id" = 1267 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1062]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.148577' WHERE "groups"."id" = 1062  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1062]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1062]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1061/1062"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:14.155511"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.155511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.159005"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 12:39:14.159005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.160993"], ["group_id", 1063], ["person_id", 1268], ["updated_at", "2014-10-13 12:39:14.160993"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.161734' WHERE "people"."id" = 1268 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1063]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.163092' WHERE "groups"."id" = 1063  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1062 OR "groups"."ancestry" ILIKE '1061/1062/%') OR "groups"."ancestry" = '1061/1062')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1062,1063) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.173677"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.173677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1064]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1064]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1064]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1064"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.178364"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.178364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.181720"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 12:39:14.181720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.183917"], ["group_id", 1065], ["person_id", 1269], ["updated_at", "2014-10-13 12:39:14.183917"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.185236' WHERE "people"."id" = 1269 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1065]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.187415' WHERE "groups"."id" = 1065  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1065]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1065]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1065]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1064/1065"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:14.193455"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.193455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.196498"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 12:39:14.196498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.198307"], ["group_id", 1066], ["person_id", 1270], ["updated_at", "2014-10-13 12:39:14.198307"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.198899' WHERE "people"."id" = 1270 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1066]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.200153' WHERE "groups"."id" = 1066  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.202698"], ["group_id", 1066], ["person_id", 1270], ["updated_at", "2014-10-13 12:39:14.202698"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.203659' WHERE "people"."id" = 1270 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1066]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.205255' WHERE "groups"."id" = 1066  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1065 OR "groups"."ancestry" ILIKE '1064/1065/%') OR "groups"."ancestry" = '1064/1065')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1065,1066) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.214688"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.214688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1067]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1067]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1067"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.219978"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.219978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.223723"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 12:39:14.223723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.225924"], ["group_id", 1068], ["person_id", 1271], ["updated_at", "2014-10-13 12:39:14.225924"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.226655' WHERE "people"."id" = 1271 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1068]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.228139' WHERE "groups"."id" = 1068  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1068]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1068]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1068]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1067/1068"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:14.233838"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.233838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.237778"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 12:39:14.237778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.239853"], ["group_id", 1069], ["person_id", 1272], ["updated_at", "2014-10-13 12:39:14.239853"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.240580' WHERE "people"."id" = 1272 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1069]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.241953' WHERE "groups"."id" = 1069  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.243614"], ["group_id", 1069], ["person_id", 1272], ["updated_at", "2014-10-13 12:39:14.243614"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.244272' WHERE "people"."id" = 1272 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1069]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.245501' WHERE "groups"."id" = 1069  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1068 OR "groups"."ancestry" ILIKE '1067/1068/%') OR "groups"."ancestry" = '1067/1068')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1068,1069) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.7ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.257427"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.257427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.264593"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.264593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1071]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1071]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1071]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1071"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.269813"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.269813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1071]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1071'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.280589"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.280589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1073'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.286148"], ["slug", "surname-0018"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 12:39:14.286148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.293335"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.293335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1074]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1074]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1074]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1074"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.297808"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.297808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.299074"], ["group_id", 1075], ["person_id", 1273], ["updated_at", "2014-10-13 12:39:14.299074"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.299761' WHERE "people"."id" = 1273 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.300666' WHERE "groups"."id" = 1075  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.311904"], ["slug", "surname-0019"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 12:39:14.311904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.318730"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.318730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1076]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1076]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1076"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.323672"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.323672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.325219"], ["group_id", 1077], ["person_id", 1274], ["updated_at", "2014-10-13 12:39:14.325219"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.326013' WHERE "people"."id" = 1274 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.326718' WHERE "groups"."id" = 1077  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.330510"], ["slug", "surname-0020"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 12:39:14.330510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.355225"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.355225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1078]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1078]]  (0.6ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1078"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.362455"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.362455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.364225"], ["group_id", 1079], ["person_id", 1275], ["updated_at", "2014-10-13 12:39:14.364225"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.365131' WHERE "people"."id" = 1275 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.365853' WHERE "groups"."id" = 1079  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:14.401940"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.401940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1080"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.408000"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.408000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.410738"], ["slug", "surname-0021"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 12:39:14.410738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:14.412774"], ["group_id", 1081], ["person_id", 1276], ["updated_at", "2014-10-13 12:39:14.412774"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1276]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:14.414190' WHERE "people"."id" = 1276 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:14.414853' WHERE "groups"."id" = 1081  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 1080) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1080 [["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.418647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1080]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1080"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:14.424596"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:14.424596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:14.871554"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:14.871554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1277]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1277) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0021/edit" for 127.0.0.1 at 2014-10-13 13:39:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1276) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1081) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1081) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1276]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 45ms (Views: 38.4ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership?id=surname-0021" for 127.0.0.1 at 2014-10-13 13:39:15 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1276) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (9.6ms) Completed 200 OK in 25ms (Views: 18.1ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0021" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0021", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1081", "leader"=>"0", "id"=>"211"}, "70157259447520"=>{"role"=>"Talker", "group_id"=>"1082", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0021"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1276) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1276]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1276 AND "memberships"."id" != 211 AND "memberships"."group_id" = 1081) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1081 AND "memberships"."id" != 211 AND "memberships"."person_id" = 1276) LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0021' AND "people"."given_name" = '' AND ("people"."id" != 1276) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1276 AND "memberships"."id" != 211 AND "memberships"."group_id" = 1081) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1081 AND "memberships"."id" != 211 AND "memberships"."person_id" = 1276) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1276 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:16.177329"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 211 [["role", ""], ["updated_at", "2014-10-13 12:39:16.178386"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:16.179090' WHERE "people"."id" = 1276 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:16.179734' WHERE "groups"."id" = 1081 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:16.180591"], ["group_id", 1082], ["person_id", 1276], ["role", "Talker"], ["updated_at", "2014-10-13 12:39:16.180591"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1276]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:16.182135' WHERE "people"."id" = 1276 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1082]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:16.183547' WHERE "groups"."id" = 1082  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/surname-0021 Completed 302 Found in 24ms (ActiveRecord: 4.3ms) Started GET "/people/surname-0021" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1276) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1082) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1081) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1082) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1080, 1081) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1276]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:16.281134"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:16.281134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1083]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1083]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1083]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1083"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:16.288629"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:16.288629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:16.291600"], ["slug", "surname-0022"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 12:39:16.291600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:16.293580"], ["group_id", 1084], ["person_id", 1278], ["updated_at", "2014-10-13 12:39:16.293580"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1278]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:16.294999' WHERE "people"."id" = 1278 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:16.295730' WHERE "groups"."id" = 1084  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:16.740951"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:16.740951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1279]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 23ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1279) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started GET "/people/surname-0022/edit" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0022"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0022' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1278) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1083, 1084) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1083, 1084) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.2ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0022" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0022", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1084", "leader"=>"0", "id"=>"213"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0022"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0022' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1278) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1278]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1278 AND "memberships"."id" != 213 AND "memberships"."group_id" = 1084) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1084 AND "memberships"."id" != 213 AND "memberships"."person_id" = 1278) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0022' AND "people"."given_name" = '' AND ("people"."id" != 1278) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1278 AND "memberships"."id" != 213 AND "memberships"."group_id" = 1084) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1084 AND "memberships"."id" != 213 AND "memberships"."person_id" = 1278) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1278 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:17.043791"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 213 [["role", "Head Honcho"], ["updated_at", "2014-10-13 12:39:17.044873"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:17.045607' WHERE "people"."id" = 1278 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:17.046155' WHERE "groups"."id" = 1084  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/surname-0022 Completed 302 Found in 18ms (ActiveRecord: 3.4ms) Started GET "/people/surname-0022" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0022"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0022' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1278) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1083, 1084) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1083, 1084) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1278]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:17.147332"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:17.147332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1280]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1280]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1280]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1280) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:17.197917"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:17.197917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1085]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1085]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1085]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1085"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:17.204277"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:17.204277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:17.207117"], ["slug", "surname-0023"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 12:39:17.207117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:17.209026"], ["group_id", 1086], ["person_id", 1281], ["updated_at", "2014-10-13 12:39:17.209026"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1281]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:17.210526' WHERE "people"."id" = 1281 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:17.211195' WHERE "groups"."id" = 1086  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0023/edit" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0023"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1280]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0023' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1281) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1085, 1086) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1085, 1086) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1281]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.4ms | ActiveRecord: 1.8ms) Started DELETE "/memberships/214?referer=%2Fpeople%2Fsurname-0023%2Fedit" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0023/edit", "id"=>"214"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1280]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 214]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 214]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1281]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:17.266386' WHERE "people"."id" = 1281 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1086]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:17.268491' WHERE "groups"."id" = 1086  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0023/edit Completed 302 Found in 7ms (ActiveRecord: 1.8ms) Started GET "/people/surname-0023/edit" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0023"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1280]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0023' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1281) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.8ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1281]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1281]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:17.341809"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:17.341809"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1087]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1087]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1087]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1087"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:17.346850"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:17.346850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:17.789970"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:17.789970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1282]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1282) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 31.8ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 29.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:17 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1088", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:18.074900"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 12:39:18.074900"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:18.075856"], ["group_id", 1088], ["leader", "t"], ["person_id", 1283], ["role", "Head Honcho"], ["updated_at", "2014-10-13 12:39:18.075856"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1283]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:18.077370' WHERE "people"."id" = 1283 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1088]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:18.078875' WHERE "groups"."id" = 1088  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/taylor Completed 302 Found in 13ms (ActiveRecord: 2.1ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1283) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1087, 1088) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1087, 1088) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1283]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:18.178303"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:18.178303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1089]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1089]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1089]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1089"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:18.182852"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:18.182852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:18.624979"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:18.624979"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1284]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1284) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 36.6ms | ActiveRecord: 1.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 33.6ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1284]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.002937"], ["updated_at", "2014-10-13 12:39:19.002937"], ["user_email", "example.user.105@digital.justice.gov.uk"], ["value", "b730c9af-7b39-4d1a-8710-1ce2b38c7a09"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 87]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.014732"], ["updated_at", "2014-10-13 12:39:19.014732"], ["user_email", "example.user.106@digital.justice.gov.uk"], ["value", "dc46d303-bd58-454f-a291-c711a13e8671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.019752"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 12:39:19.019752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.023481"], ["updated_at", "2014-10-13 12:39:19.023481"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "21f77a1d-07fc-46df-b9ba-5b3741c55186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.027759"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 12:39:19.027759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.031384"], ["slug", "surname-0026"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 12:39:19.031384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0026"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1286]] Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0026' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1287) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.043287"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 12:39:19.043287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1288]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.048750"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 12:39:19.048750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1289]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.056299"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 12:39:19.056299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1290]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.068283"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.068283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1091]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1091]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1091]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1091"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.073498"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.073498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.078055"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 12:39:19.078055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1291]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.085675"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 12:39:19.085675"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.091087"], ["slug", "surname-0032"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 12:39:19.091087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0032"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1292]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0032' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1293) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1293]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.102203"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 12:39:19.102203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.105383"], ["slug", "surname-0034"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 12:39:19.105383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1294]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1295) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1295]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.116209"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 12:39:19.116209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.121068"], ["slug", "surname-0036"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 12:39:19.121068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0036"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1296]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0036' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1297) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1297]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.131454"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 12:39:19.131454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1298]] Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.139591"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 12:39:19.139591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1299]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.150959"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.150959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1093]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1093]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1093]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1093"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.156072"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.156072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.161083"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 12:39:19.161083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.164010"], ["slug", "surname-0040"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 12:39:19.164010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0040"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1300]] Peoplefinder::Person Load (1.0ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0040' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1301) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.176080"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 12:39:19.176080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.178807"], ["slug", "surname-0042"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 12:39:19.178807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0042"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1302]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0042' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1303) ORDER BY groups.name Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.193546"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.193546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1095]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1095]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1095]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1095"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.198395"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.198395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.203393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 12:39:19.203393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.205892"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 12:39:19.205892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1304]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.217386"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 12:39:19.217386"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1306]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.226183"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 12:39:19.226183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1307]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.238921"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.238921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1097]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1097]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1097]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1097"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.243739"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.243739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.248516"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 12:39:19.248516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1308]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.258981"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 12:39:19.258981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1309]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.267794"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 12:39:19.267794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0049"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1310]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0049' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0049' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.278904"], ["slug", "surname-0049"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 12:39:19.278904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0049 Completed 302 Found in 7ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.284765"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 12:39:19.284765"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0051"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1312]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0051' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0051' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.291668"], ["slug", "surname-0051"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 12:39:19.291668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0051 Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.297816"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 12:39:19.297816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0053"}} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1314]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0053' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0053' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.306340"], ["slug", "surname-0053"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 12:39:19.306340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0053 Completed 302 Found in 8ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.312419"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 12:39:19.312419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0055", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1316]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0055' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0055' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.332275"], ["image", nil], ["slug", "surname-0055"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 12:39:19.332275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0055/image/edit Completed 302 Found in 20ms (ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.340379"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 12:39:19.340379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.343871"], ["slug", "surname-0057"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 12:39:19.343871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0057"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1318]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0057' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1319) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.355196"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 12:39:19.355196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.359754"], ["slug", "surname-0059"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 12:39:19.359754"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0059"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1320]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0059' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1321) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.373772"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.373772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1099]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1099]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1099]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1099"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.378627"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.378627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.383389"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 12:39:19.383389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.387939"], ["slug", "surname-0061"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 12:39:19.387939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1322]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0061' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1323) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.398691"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 12:39:19.398691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0063' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.402249"], ["slug", "surname-0063"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 12:39:19.402249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.410168"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.410168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1101]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1101]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1101]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1101"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.415219"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.415219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.417004"], ["group_id", 1102], ["person_id", 1325], ["updated_at", "2014-10-13 12:39:19.417004"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1325]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:19.419489' WHERE "people"."id" = 1325 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:19.420446' WHERE "groups"."id" = 1102  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0063"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1324]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0063' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1325) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.430859"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 12:39:19.430859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.433484"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 12:39:19.433484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.436758"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 12:39:19.436758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1326]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1328) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 1328) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.450033"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 12:39:19.450033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.453699"], ["slug", "surname-0066"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 12:39:19.453699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0066"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1329]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0066' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1330) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.465118"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 12:39:19.465118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0068' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.469293"], ["slug", "surname-0068"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 12:39:19.469293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0068"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1331]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0068' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1332) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.484233"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.484233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1103]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1103]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1103]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1103"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.489582"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.489582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.494491"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 12:39:19.494491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0070' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.497791"], ["slug", "surname-0070"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 12:39:19.497791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0070"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1333]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0070' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1334) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.510991"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 12:39:19.510991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.514949"], ["slug", "surname-0072"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 12:39:19.514949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0072"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1335]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0072' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1336) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.527119"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 12:39:19.527119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0074' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.530465"], ["slug", "surname-0074"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 12:39:19.530465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0075", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0074"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1337]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0074' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1338) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0075' AND "people"."given_name" IS NULL AND ("people"."id" != 1338) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1338 [["surname", "Surname-0075"], ["updated_at", "2014-10-13 12:39:19.539390"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0074 Completed 302 Found in 9ms (ActiveRecord: 1.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1338]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.546098"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 12:39:19.546098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.549302"], ["slug", "surname-0077"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 12:39:19.549302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0078", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0077"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1339]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0077' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1340) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0078' AND "people"."given_name" IS NULL AND ("people"."id" != 1340) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1340 [["surname", "Surname-0078"], ["updated_at", "2014-10-13 12:39:19.559024"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0077 Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.565106"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 12:39:19.565106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0080' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.568775"], ["slug", "surname-0080"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 12:39:19.568775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0081", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0080"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1341]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0080' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1342) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0081' AND "people"."given_name" IS NULL AND ("people"."id" != 1342) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1342 [["surname", "Surname-0081"], ["updated_at", "2014-10-13 12:39:19.580271"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0080 Completed 302 Found in 10ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.587000"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 12:39:19.587000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0083' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:19.590560"], ["slug", "surname-0083"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 12:39:19.590560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0084", "image"=>"#"}, "id"=>"surname-0083"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1343]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0083' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1344) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0084' AND "people"."given_name" IS NULL AND ("people"."id" != 1344) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1344]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 1344 [["image", nil], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 12:39:19.599616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0083/image/edit Completed 302 Found in 9ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.607513"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 12:39:19.607513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.614965"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.614965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1105]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1105]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1105]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1105"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.620192"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.620192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0046"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1345]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0046' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1106) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.631871"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 12:39:19.631871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.641984"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.641984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1107]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1107]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1107]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1107"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.647735"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.647735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0047"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1346]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0047' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1108) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1107]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1107]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1107/1108/%' OR "groups"."ancestry" = '1107/1108')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1107/1108' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1108]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.4ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.663618"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 12:39:19.663618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.667160"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.667160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1109]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1109]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1109]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1109"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.674355"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.674355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0049"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1347]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0049' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1110) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1109]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1109]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1109/1110/%' OR "groups"."ancestry" = '1109/1110')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1109/1110' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1110]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0048 Completed 302 Found in 8ms (ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.690290"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 12:39:19.690290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1348]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.698859"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 12:39:19.698859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1349]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.707316"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 12:39:19.707316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1350]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.713812"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 12:39:19.713812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.721951"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.721951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1111]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1111]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1111]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1111"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.727556"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.727556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1351]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.735747"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 12:39:19.735747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.742965"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.742965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1352]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.750442"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 12:39:19.750442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0051", "team_email_address"=>"example.user.130@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1353]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.771272"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.771272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0051 Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.776711"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 12:39:19.776711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0052", "team_email_address"=>"example.user.131@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1354]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.782427"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.782427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0052 Completed 302 Found in 4ms (ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.790705"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 12:39:19.790705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0053", "team_email_address"=>"example.user.132@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1355]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.797030"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.797030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0053 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.802001"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 12:39:19.802001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1356]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.812886"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 12:39:19.812886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1357]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.823979"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 12:39:19.823979"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1358]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.834376"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 12:39:19.834376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.845149"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.845149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1117]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1117]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1117]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1117"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.849953"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.849953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0054"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1359]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0054' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1118) ORDER BY people.surname Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.862707"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 12:39:19.862707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.871205"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.871205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0055-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1119"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.876420"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.876420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0056", "team_email_address"=>"example.user.137@digital.justice.gov.uk"}, "id"=>"group-0055"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1360]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0055' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1120) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1119]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0056-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1120) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0056' AND "groups"."id" != 1120) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 1120 [["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.889861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0056 Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1120]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.895295"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 12:39:19.895295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.902775"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.902775"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1121]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1121]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1121]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0057-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1121"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.908654"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.908654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0057", "team_email_address"=>"example.user.138@digital.justice.gov.uk"}, "id"=>"group-0057"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1361]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0057' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1122) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0057' AND "groups"."id" != 1122) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0057 Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.920863"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 12:39:19.920863"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.928104"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.928104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1123]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1123]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1123]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1123"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.935825"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.935825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0058", "team_email_address"=>"example.user.140@digital.justice.gov.uk"}, "id"=>"group-0058"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1362]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0058' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1124) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0058' AND "groups"."id" != 1124) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0058 Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.949393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 12:39:19.949393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.959899"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.959899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1125"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.964482"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.964482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0059"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1363]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0059' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1126) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1125]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1126) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1126) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.981313"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 12:39:19.981313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:19.990673"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.990673"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1127"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:19.995499"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:19.995499"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0060"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1364]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0060' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1128) ORDER BY people.surname  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1127]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1128) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1128) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 0.9ms | ActiveRecord: 3.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.015285"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 12:39:20.015285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.023526"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.023526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1129"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.028166"], ["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.028166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1365]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0061' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1130) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1129]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1130) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1130) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.045128"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 12:39:20.045128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1366]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.053015"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 12:39:20.053015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1367]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.061463"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 12:39:20.061463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.067801"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.067801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1368]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.077561"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 12:39:20.077561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.084834"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.084834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1369]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.098775"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 12:39:20.098775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1370]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.103264"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:20.103264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1371]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0111' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.107322"], ["slug", "surname-0111"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 12:39:20.107322"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.114785"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.114785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1133]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.7ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1133"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.121209"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 12:39:20.121209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.123740"], ["group_id", 1134], ["person_id", 1372], ["updated_at", "2014-10-13 12:39:20.123740"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1372]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:20.125409' WHERE "people"."id" = 1372 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:20.126154' WHERE "groups"."id" = 1134  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1372]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0112' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.131055"], ["slug", "surname-0112"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 12:39:20.131055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1373]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.146066"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.146066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1135) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1135 [["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.149724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1135) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1135 [["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.154154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1135) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1135 [["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.157260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.168477"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.168477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1136) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1136 [["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.172332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1136) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1136 [["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.175405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1136) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1136 [["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.178360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1136) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1136 [["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.184275"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.193296"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.193296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1137) LIMIT 1 SQL (0.4ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1137 [["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.196413"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1137) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1137 [["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.201475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1137) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1137 [["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.205544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.217452"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.217452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1138) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1138 [["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.231944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0115' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.239678"], ["slug", "surname-0115"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 12:39:20.239678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.246243"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.246243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1139"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.251701"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.251701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1139) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1139 [["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.255153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1139]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1139"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.260230"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.260230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.262396"], ["group_id", 1141], ["person_id", 1374], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:20.262396"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1374]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:20.263974' WHERE "people"."id" = 1374 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:20.264665' WHERE "groups"."id" = 1141  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.265919"], ["group_id", 1140], ["person_id", 1374], ["role", "Designer"], ["updated_at", "2014-10-13 12:39:20.265919"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1374]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:20.267874' WHERE "people"."id" = 1374 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:20.268677' WHERE "groups"."id" = 1140  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1374]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0116' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.275908"], ["slug", "surname-0116"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 12:39:20.275908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0117' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:20.279635"], ["slug", "surname-0117"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 12:39:20.279635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:20.304144"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:20.304144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1377]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1377]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1377]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1377) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.0ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.376137"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.376137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1142]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1142]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1142]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1142"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.380981"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.380981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0078" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0078"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:20.400892"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:20.400892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0078 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0078" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0078"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1378]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0078' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1143) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1142, 1143) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1143]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1142/1143' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1142/1143' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1143]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.497228"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 12:39:20.497228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:20.500316"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 12:39:20.500316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.509099"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.509099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1144]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1144]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1144]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1144"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:20.513476"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:20.513476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:20.515399"], ["group_id", 1145], ["person_id", 1380], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:20.515399"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1380]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:20.516738' WHERE "people"."id" = 1380 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:20.517404' WHERE "groups"."id" = 1145  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1379]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1380]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:21.546316"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 12:39:21.546316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:21.548875"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 12:39:21.548875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:21.555928"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:21.555928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1146]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1146]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1146]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1146"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:21.561200"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:21.561200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:21.563318"], ["group_id", 1147], ["person_id", 1382], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:21.563318"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1382]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:21.564832' WHERE "people"."id" = 1382 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:21.565508' WHERE "groups"."id" = 1147  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1381]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1382]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:22.587346"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 12:39:22.587346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:22.603561"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 12:39:22.603561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:22.611524"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:22.611524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1148]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1148]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1148]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1148"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:22.616268"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:22.616268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:22.618305"], ["group_id", 1149], ["person_id", 1384], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:22.618305"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1384]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:22.619887' WHERE "people"."id" = 1384 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:22.620694' WHERE "groups"."id" = 1149  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1383]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1384]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1382, 1384, 1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1382, 1384, 1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1382, 1384, 1380) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:23.642682"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 12:39:23.642682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:23.645476"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 12:39:23.645476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:23.652119"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:23.652119"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1150]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1150]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1150]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1150"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:23.658649"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:23.658649"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:23.660803"], ["group_id", 1151], ["person_id", 1386], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:23.660803"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1386]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:23.662301' WHERE "people"."id" = 1386 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:23.663034' WHERE "groups"."id" = 1151  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1385]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1386]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381, 1385, 1383) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381, 1385, 1383) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1379, 1381, 1385, 1383) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:24.684749"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 12:39:24.684749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:24.687406"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 12:39:24.687406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:24.693824"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:24.693824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1152]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1152]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1152]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1152"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:24.699092"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:24.699092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:24.701712"], ["group_id", 1153], ["person_id", 1388], ["role", "Cleaner"], ["updated_at", "2014-10-13 12:39:24.701712"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1388]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:24.703576' WHERE "people"."id" = 1388 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:24.704474' WHERE "groups"."id" = 1153  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1387]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1388]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1386, 1382, 1388, 1380, 1384) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1386, 1382, 1388, 1380, 1384) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1386, 1382, 1388, 1380, 1384) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK SQL (0.6ms) DELETE FROM "memberships" SQL (0.3ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:25.776574"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 12:39:25.776574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.780695"], ["updated_at", "2014-10-13 12:39:25.780695"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "daa50c20-faed-4050-a770-46ca7bfa0abe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1389]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 11.6ms Sent mail to test.user@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7fdc0f51_fad33fcebd465bec48dd@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/daa50c20-faed-4050-a770-46ca7bfa0abe?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:25.799480"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 12:39:25.799480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.803370"], ["updated_at", "2014-10-13 12:39:25.803370"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "04614bc6-7ee0-4057-be70-3a58dcf0edac"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1390]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.7ms Sent mail to test.user@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7fdc63d0_fad33fcebd465bec49c3@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/04614bc6-7ee0-4057-be70-3a58dcf0edac?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:25.820987"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 12:39:25.820987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.825347"], ["updated_at", "2014-10-13 12:39:25.825347"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "8ec2f16d-bf42-40f2-8467-7ca930b57708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1391]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.2ms Sent mail to test.user@digital.justice.gov.uk (6.9ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7fdcb7d4_fad33fcebd465bec5061@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/8ec2f16d-bf42-40f2-8467-7ca930b57708?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:25.845874"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 12:39:25.845874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.849947"], ["updated_at", "2014-10-13 12:39:25.849947"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "01243d10-66fb-4aae-b09c-57111769dd8f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1392]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.2ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7fdd17da_fad33fcebd465bec5197@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/01243d10-66fb-4aae-b09c-57111769dd8f?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:25.867052"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 12:39:25.867052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.871875"], ["updated_at", "2014-10-13 12:39:25.871875"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "53571b3a-b79a-4c3b-8997-7aed667a278c"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1393]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 13.1ms Sent mail to test.user@digital.justice.gov.uk (5.9ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bc7fdd76d3_fad33fcebd465bec52e0@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/53571b3a-b79a-4c3b-8997-7aed667a278c?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.892684"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 12:39:25.892684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.895543"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 12:39:25.895543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1395], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1394]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 7.8ms Sent mail to recipient@example.com (4.8ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bc7fddd6a0_fad33fcebd465bec534b@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.915807"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 12:39:25.915807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.918407"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 12:39:25.918407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1397], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1396]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.7ms Sent mail to recipient@example.com (4.6ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bc7fde245a_fad33fcebd465bec54d0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.934860"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 12:39:25.934860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.939390"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 12:39:25.939390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1399], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1398]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to recipient@example.com (4.6ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bc7fde7459_fad33fcebd465bec552e@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.955602"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 12:39:25.955602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.958020"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 12:39:25.958020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1401], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1400]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.1ms Sent mail to recipient@example.com (4.9ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bc7fdebe8d_fad33fcebd465bec564b@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.975085"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 12:39:25.975085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:25.977453"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 12:39:25.977453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1403], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1402]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.3ms Sent mail to recipient@example.com (16.4ms) Date: Mon, 13 Oct 2014 13:39:25 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bc7fdf05ba_fad33fcebd465bec5777@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.005543"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 12:39:26.005543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0124' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.008918"], ["slug", "surname-0124"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 12:39:26.008918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.016213"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.016213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1154]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1154]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1154]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1154"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.021585"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.021585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.022888"], ["group_id", 1155], ["person_id", 1405], ["updated_at", "2014-10-13 12:39:26.022888"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.023537' WHERE "people"."id" = 1405 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.024128' WHERE "groups"."id" = 1155  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"225"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1404]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 225]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 225]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1405]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.028875' WHERE "people"."id" = 1405 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1155]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.030223' WHERE "groups"."id" = 1155  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 225]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.035940"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 12:39:26.035940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0126' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.039050"], ["slug", "surname-0126"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 12:39:26.039050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.045339"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.045339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1156]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1156]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1156]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1156"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.051900"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.051900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.054074"], ["group_id", 1157], ["person_id", 1407], ["updated_at", "2014-10-13 12:39:26.054074"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.055058' WHERE "people"."id" = 1407 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.056129' WHERE "groups"."id" = 1157  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"226"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1406]] Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 226]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 226]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1407]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.062207' WHERE "people"."id" = 1407 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1157]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.063737' WHERE "groups"."id" = 1157  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.068712"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 12:39:26.068712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.071419"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 12:39:26.071419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1409"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1408]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1409' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1409]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.082176"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 12:39:26.082176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.084987"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 12:39:26.084987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1411"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1410]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1411' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1411]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.094622"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 12:39:26.094622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.097071"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 12:39:26.097071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1413"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1412]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1413' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1413]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.105360"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 12:39:26.105360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.108833"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 12:39:26.108833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.116532"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.116532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1158]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1158]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1158]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0081-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1158"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.122747"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.122747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.124917"], ["group_id", 1159], ["person_id", 1415], ["updated_at", "2014-10-13 12:39:26.124917"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1415]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.126512' WHERE "people"."id" = 1415 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.127264' WHERE "groups"."id" = 1159  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1415"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1414]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1415' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1415]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1415]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1414], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.201@digital.justice.gov.uk"], ["subject_id", 1415]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.5ms Sent mail to example.user.201@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 13:39:26 +0100 From: support@example.com To: example.user.201@digital.justice.gov.uk Message-ID: <543bc7fe22b05_fad33fcebd465bec58c8@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0133 has said that they believe the information on Surname-0134 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.150746"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 12:39:26.150746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.153982"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 12:39:26.153982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.161224"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.161224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1160]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1160]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1160]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1160"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.166033"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.166033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.168114"], ["group_id", 1161], ["person_id", 1417], ["updated_at", "2014-10-13 12:39:26.168114"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1417]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.170203' WHERE "people"."id" = 1417 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.171050' WHERE "groups"."id" = 1161  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1417"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1416]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1417' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1417]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1417]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1416], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.203@digital.justice.gov.uk"], ["subject_id", 1417]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.4ms Sent mail to example.user.203@digital.justice.gov.uk (6.8ms) Date: Mon, 13 Oct 2014 13:39:26 +0100 From: support@example.com To: example.user.203@digital.justice.gov.uk Message-ID: <543bc7fe2cfb1_fad33fcebd465bec5964@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0135 has said that they believe the information on Surname-0136 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1417]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.196505"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 12:39:26.196505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.199043"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 12:39:26.199043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.206615"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.206615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1162]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1162]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1162]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1162"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.211906"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.211906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.214145"], ["group_id", 1163], ["person_id", 1419], ["updated_at", "2014-10-13 12:39:26.214145"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1419]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.215609' WHERE "people"."id" = 1419 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.216269' WHERE "groups"."id" = 1163  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1419"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1418]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1419' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1419]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1419]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1418], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.205@digital.justice.gov.uk"], ["subject_id", 1419]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.7ms Sent mail to example.user.205@digital.justice.gov.uk (5.7ms) Date: Mon, 13 Oct 2014 13:39:26 +0100 From: support@example.com To: example.user.205@digital.justice.gov.uk Message-ID: <543bc7fe39583_fad33fcebd465bec60c0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0137 has said that they believe the information on Surname-0138 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 22ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.245035"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 12:39:26.245035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.247710"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 12:39:26.247710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.256046"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.256046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1164]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1164]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1164]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1164"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.261102"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.261102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.263361"], ["group_id", 1165], ["person_id", 1421], ["updated_at", "2014-10-13 12:39:26.263361"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1421]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.264921' WHERE "people"."id" = 1421 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.265628' WHERE "groups"."id" = 1165  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1421"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1420]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1421' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1421]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1421]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1420], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.207@digital.justice.gov.uk"], ["subject_id", 1421]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.8ms Sent mail to example.user.207@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 13:39:26 +0100 From: support@example.com To: example.user.207@digital.justice.gov.uk Message-ID: <543bc7fe445a7_fad33fcebd465bec61c7@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0139 has said that they believe the information on Surname-0140 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.292218"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 12:39:26.292218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.297463"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 12:39:26.297463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.306151"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.306151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1166]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1166]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1166"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.311996"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.311996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:26.314323"], ["group_id", 1167], ["person_id", 1423], ["updated_at", "2014-10-13 12:39:26.314323"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1423]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:26.315771' WHERE "people"."id" = 1423 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:26.316481' WHERE "groups"."id" = 1167  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1423"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1422]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1423' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1423]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1423]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1422], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.209@digital.justice.gov.uk"], ["subject_id", 1423]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.9ms Sent mail to example.user.209@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 13:39:26 +0100 From: support@example.com To: example.user.209@digital.justice.gov.uk Message-ID: <543bc7fe50cc0_fad33fcebd465bec62fe@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0141 has said that they believe the information on Surname-0142 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.340701"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 12:39:26.340701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.343502"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 12:39:26.343502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"1425"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1424]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1425' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1425]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.365126"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.365126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1168]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1168]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1168]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1168"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.370566"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.370566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1169]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1169]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1169]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1168/1169"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.376020"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.376020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (5.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (8.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.437537"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.437537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1171]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1171]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1171]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1171"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.444624"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.444624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1171/1172"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.450030"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.450030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1171/1172/1173"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.456807"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.456807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1173]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1171/1172/1173"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.462107"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.462107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1171/1172"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.467108"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.467108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1172]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.476725"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.476725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1177]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1177]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1177]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1177"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.481475"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.481475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1177/1178"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.487960"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.487960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1177/1178/1179"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.493359"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.493359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1179]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1177/1178/1179"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.498255"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.498255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1178]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1177/1178"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.504667"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.504667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1178 OR "groups"."ancestry" ILIKE '1177/1178/%') OR "groups"."ancestry" = '1177/1178')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.513969"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.513969"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1183]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1183]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1183]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1183"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.519111"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.519111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1183/1184"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.525202"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.525202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1183/1184/1185"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.529908"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.529908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1185]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1183/1184/1185"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.534749"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.534749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1184]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1183/1184"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.542140"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.542140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1184 OR "groups"."ancestry" ILIKE '1183/1184/%') OR "groups"."ancestry" = '1183/1184')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:26.560383"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.560383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1189]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1189]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1189]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1189"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:26.565089"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.565089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1190]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1190]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1190]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1189/1190"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:26.570750"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.570750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1191]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1191]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1191]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1189/1190/1191"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:26.577331"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:26.577331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:26 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:27.022984"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:27.022984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1426]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1426]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1426]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1426) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1426]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1426]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1426]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:27.281481"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:27.281481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1427]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1427]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1427]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1427) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:27.333900"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.333900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1193]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1193]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1193]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1193"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:27.339825"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.339825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1194]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1194]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1194]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1193/1194"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:27.345417"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.345417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1195]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1195]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1195]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1193/1194/1195"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:27.350487"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.350487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1427]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1193) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1193) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1193]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 27.2ms | ActiveRecord: 2.3ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1427]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1194) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1193, 1194) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1194]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.3ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1427]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1195) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1193, 1194, 1195) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1195]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194/1195' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194/1195' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1193/1194/1195' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:27.446899"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.446899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1197]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1197]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1197]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1197"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:27.452959"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.452959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1198]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1197/1198"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:27.458381"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.458381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1199]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1199]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1199]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1197/1198/1199"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:27.463338"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:27.463338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:27.907807"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:27.907807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1428]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1428) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1428]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1200) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1197, 1198, 1199, 1200) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.1ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1200]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1197/1198/1199/1200' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1197/1198/1199/1200' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1200]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.4ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:28.235947"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:28.235947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1429]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1429]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1429]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1429) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.291700"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.291700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1201]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1201]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1201]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1201"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.297990"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.297990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1202]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1202]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1202]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1201/1202"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:28.303509"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.303509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1203]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1201/1202/1203"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:28.312178"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.312178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.315658"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 12:39:28.315658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.317477"], ["group_id", 1202], ["person_id", 1430], ["updated_at", "2014-10-13 12:39:28.317477"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.318177' WHERE "people"."id" = 1430 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.318857' WHERE "groups"."id" = 1202  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.322943"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 12:39:28.322943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.324751"], ["group_id", 1202], ["person_id", 1431], ["updated_at", "2014-10-13 12:39:28.324751"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.325410' WHERE "people"."id" = 1431 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.326024' WHERE "groups"."id" = 1202  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.328405"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 12:39:28.328405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.329868"], ["group_id", 1202], ["person_id", 1432], ["updated_at", "2014-10-13 12:39:28.329868"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.330538' WHERE "people"."id" = 1432 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.331091' WHERE "groups"."id" = 1202  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1429]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1202) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1201, 1202) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1202]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1201/1202' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1201/1202' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1201/1202' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 25.4ms | ActiveRecord: 2.1ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1429]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1202) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1201, 1202) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1202 OR "groups"."ancestry" ILIKE '1201/1202/%') OR "groups"."ancestry" = '1201/1202')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1204,1203,1202) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 24ms (Views: 16.5ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:28.411726"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:28.411726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1433]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1433]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1433) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.463140"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.463140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1205"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.468675"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.468675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1206]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1206]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1206]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1205/1206"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:28.474612"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.474612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1207]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1207]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1207]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1205/1206/1207"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:28.479641"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.479641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1205) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1205 [["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.482738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1205"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.489176"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.489176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1209) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1205, 1209) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1209]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1205/1209' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1205/1209' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1209]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 2.1ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1209) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1205, 1209) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1205]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1205) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1205/1209' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 17.9ms | ActiveRecord: 2.5ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1209) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1205, 1209) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1209 OR "groups"."ancestry" ILIKE '1205/1209/%') OR "groups"."ancestry" = '1205/1209')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1209) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:28.567168"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:28.567168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1434]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1434) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.622307"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.622307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1210]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1210]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1210"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.627636"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.627636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1211]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1211]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1211]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1210/1211"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:28.632721"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.632721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1212]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1212]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1212]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1210/1211/1212"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:28.639689"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.639689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.643128"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 12:39:28.643128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.644851"], ["group_id", 1213], ["person_id", 1435], ["updated_at", "2014-10-13 12:39:28.644851"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.645555' WHERE "people"."id" = 1435 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.646198' WHERE "groups"."id" = 1213  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.648606"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 12:39:28.648606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.650050"], ["group_id", 1213], ["person_id", 1436], ["updated_at", "2014-10-13 12:39:28.650050"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.650671' WHERE "people"."id" = 1436 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.651241' WHERE "groups"."id" = 1213  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.653825"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 12:39:28.653825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.655845"], ["group_id", 1213], ["person_id", 1437], ["updated_at", "2014-10-13 12:39:28.655845"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.656574' WHERE "people"."id" = 1437 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.657213' WHERE "groups"."id" = 1213  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1434]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1213) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1210, 1211, 1212, 1213) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1213]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1210/1211/1212/1213' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1210/1211/1212/1213' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1213]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 30.9ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:28.716697"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:28.716697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1438]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1438]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1438) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.770787"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.770787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1214]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1214]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1214]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1214"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.778550"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.778550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1215]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1215]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1215]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1214/1215"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:28.784269"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.784269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1216]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1216]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1216]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1214/1215/1216"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:28.790449"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.790449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.793638"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 12:39:28.793638"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.795347"], ["group_id", 1215], ["person_id", 1439], ["updated_at", "2014-10-13 12:39:28.795347"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.796064' WHERE "people"."id" = 1439 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.796809' WHERE "groups"."id" = 1215  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.799248"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 12:39:28.799248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.800677"], ["group_id", 1215], ["person_id", 1440], ["updated_at", "2014-10-13 12:39:28.800677"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.801306' WHERE "people"."id" = 1440 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.801874' WHERE "groups"."id" = 1215  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.806290"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 12:39:28.806290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:28.808151"], ["group_id", 1215], ["person_id", 1441], ["updated_at", "2014-10-13 12:39:28.808151"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:28.808864' WHERE "people"."id" = 1441 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:28.809570' WHERE "groups"."id" = 1215  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1438]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1215) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1214, 1215) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1215]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1214/1215' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1214/1215' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1214/1215' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:28.841577"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:28.841577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1442]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1442]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1442]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1442) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.893310"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.893310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1218]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1218]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1218]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1218"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:28.898854"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.898854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1219]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1219]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1219]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1218/1219"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:28.904818"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.904818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1220]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1220]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1220]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1218/1219/1220"], ["ancestry_depth", 3], ["created_at", "2014-10-13 12:39:28.910210"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.910210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 13:39:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1442]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1221) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1218, 1219, 1220, 1221) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1221]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1218/1219/1220/1221' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1218/1219/1220/1221' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1221]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:28.946825"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:28.946825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:28.949799"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 12:39:28.949799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1443]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:29.969381"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:29.969381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1444]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1444]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1444]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1444) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.1ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1444]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1444]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1443) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1443]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.9ms | ActiveRecord: 0.9ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:30.126639"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:30.126639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1445]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1445]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1445]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1445) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 43ms (Views: 37.2ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (1.2ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1445]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1445) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.1ms | ActiveRecord: 1.2ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1445]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1445) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1445]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1445]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:30 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.255499"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 12:39:30.255499"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.261980"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.261980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1446]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.270706"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 12:39:30.270706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0147' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.274586"], ["slug", "surname-0147"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 12:39:30.274586"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.276426"], ["event", "create"], ["item_id", 1448], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0147\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.283083"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.283083"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.284660"], ["event", "create"], ["item_id", 1224], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.269@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1224]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1224]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1224]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1224"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:30.289935"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.289935"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.291854"], ["event", "create"], ["item_id", 1225], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0086\nteam_email_address:\n- \n- example.user.268@digital.justice.gov.uk\nancestry:\n- \n- '1224'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.293470"], ["group_id", 1225], ["person_id", 1448], ["updated_at", "2014-10-13 12:39:30.293470"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.294936"], ["event", "create"], ["item_id", 241], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1448\ngroup_id:\n- \n- 1225\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:30.295664' WHERE "people"."id" = 1448 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:30.296472' WHERE "groups"."id" = 1225  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 241]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.299092"], ["event", "destroy"], ["item_id", 241], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 241\ngroup_id: 1225\nperson_id: 1448\nrole: \ncreated_at: &1 2014-10-13 12:39:30.293470000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 241], ["item_type", "Peoplefinder::Membership"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:30.301075' WHERE "people"."id" = 1448 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:30.301709' WHERE "groups"."id" = 1225  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"129"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1447]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 129]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 241]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.310374"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 12:39:30.310374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0149' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.313082"], ["slug", "surname-0149"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 12:39:30.313082"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.315088"], ["event", "create"], ["item_id", 1450], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0149\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.322702"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.322702"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.324685"], ["event", "create"], ["item_id", 1226], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.271@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1226]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1226]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1226]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1226"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:30.329485"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.329485"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.331385"], ["event", "create"], ["item_id", 1227], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0087\nteam_email_address:\n- \n- example.user.270@digital.justice.gov.uk\nancestry:\n- \n- '1226'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.332818"], ["group_id", 1227], ["person_id", 1450], ["updated_at", "2014-10-13 12:39:30.332818"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.334448"], ["event", "create"], ["item_id", 242], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1450\ngroup_id:\n- \n- 1227\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:30.335128' WHERE "people"."id" = 1450 SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:30.335893' WHERE "groups"."id" = 1227  (0.2ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.6ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"133"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1449]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 133]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 242]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.346248"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 12:39:30.346248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0151' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.348860"], ["slug", "surname-0151"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 12:39:30.348860"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.350629"], ["event", "create"], ["item_id", 1452], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0151\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"134"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1451]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 134]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1452]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1452]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1452]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:30.358774"], ["event", "destroy"], ["item_id", 1452], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1452\ngiven_name: \nsurname: Surname-0151\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 12:39:30.348860000 Z\nupdated_at: 2014-10-13 12:39:30.348860000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0150"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1452], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1452]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.365508"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 12:39:30.365508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:30.369194"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 12:39:30.369194"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.371490"], ["event", "create"], ["item_id", 1454], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1454]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1454]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.375675"], ["event", "destroy"], ["item_id", 1454], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1454\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 12:39:30.369194000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1454], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"137"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1453]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 137]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1454]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1454) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.369194"], ["id", 1454], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 12:39:30.398636"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:30.400675"], ["event", "create"], ["item_id", 1454], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 23ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.407742"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 12:39:30.407742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1455]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.416135"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 12:39:30.416135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1456]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.426168"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 12:39:30.426168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1457]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.446778"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.446778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.460155"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:30.460155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:30.468677"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:30.468677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:30.484606"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:30.484606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:30.495445"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:30.495445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:30.506259"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:30.506259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:30.516442"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 12:39:30.516442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0156' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:30.820949"], ["image", "placeholder.png"], ["slug", "surname-0156"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 12:39:30.820949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0157' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:31.212357"], ["image", "placeholder.png"], ["slug", "surname-0157"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 12:39:31.212357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:31.711544"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:31.711544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1465]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1465]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 19ms (ActiveRecord: 2.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1465]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1465) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 39.2ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:31.775706"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:31.775706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1230"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:31.782912"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:31.782912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1231]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1231]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1230/1231"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:31.789740"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:31.789740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1230]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1230"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:31.796303"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:31.796303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1233]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1233]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1233]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1230/1233"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:31.802464"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:31.802464"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0158' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:31.807053"], ["slug", "surname-0158"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 12:39:31.807053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:31.808915"], ["group_id", 1232], ["person_id", 1466], ["updated_at", "2014-10-13 12:39:31.808915"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:31.809688' WHERE "people"."id" = 1466 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:31.810366' WHERE "groups"."id" = 1232  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:31.812062"], ["group_id", 1234], ["person_id", 1466], ["updated_at", "2014-10-13 12:39:31.812062"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:31.812724' WHERE "people"."id" = 1466 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:31.813327' WHERE "groups"."id" = 1234  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1465]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1234) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1230, 1233, 1234) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1234]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1230/1233/1234' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1230/1233/1234' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1234]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.2ms | ActiveRecord: 2.1ms) Started GET "/people/surname-0158" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0158"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1465]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0158' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1466) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1234]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1230, 1231, 1232) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1230, 1233, 1234) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1230, 1231, 1232) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1230, 1233, 1234) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:31.877685"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:31.877685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1467]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1467]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1467]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1467) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (43.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 59ms (Views: 53.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0159' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:31.945144"], ["slug", "surname-0159"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 12:39:31.945144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0159" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0159"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1467]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0159' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1468) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:31.978977"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:31.978977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1469]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1469]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1469]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1469) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.3ms | ActiveRecord: 1.4ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0160' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:32.032751"], ["slug", "surname-0160"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 12:39:32.032751"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0160" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0160"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1469]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0160' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1470) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:32.064347"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:32.064347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1471]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1471) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.0ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:32.166123"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:32.166123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 13ms (ActiveRecord: 1.4ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1472) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1471]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1472) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (18.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 49.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:32.273172"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:32.273172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1473]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1473) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 39.2ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0161' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:32.326338"], ["slug", "surname-0161"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 12:39:32.326338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0161/edit" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0161"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0161' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1474) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 0.9ms) Started DELETE "/people/surname-0161" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0161"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0161' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1474) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1474]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1473]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1474]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:32.409655"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:32.409655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1475]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1475]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1475]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1475) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 38.8ms | ActiveRecord: 1.4ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0162' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:32.464248"], ["slug", "surname-0162"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 12:39:32.464248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:32.473765"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:32.473765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1235]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1235]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1235]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1235"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:32.479521"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:32.479521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:32.481043"], ["group_id", 1236], ["person_id", 1476], ["updated_at", "2014-10-13 12:39:32.481043"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:32.481781' WHERE "people"."id" = 1476 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:32.482491' WHERE "groups"."id" = 1236  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0162/edit" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0162"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1475]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0162' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1476) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1235, 1236) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1235, 1236) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1476]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (9.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (41.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 60ms (Views: 53.6ms | ActiveRecord: 1.8ms) Started DELETE "/people/surname-0162" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0162"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1475]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0162' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1476) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 245]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1476]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:32.557361' WHERE "people"."id" = 1476 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:32.558258' WHERE "groups"."id" = 1236 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1476]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 11ms (ActiveRecord: 2.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1475]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 245]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1476]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:32.580990"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:32.580990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1477]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1477]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1477]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1477) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:32.634127"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:32.634127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1477]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1478) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1477]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1478) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.0ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1477]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1478) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 30.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:32.762534"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:32.762534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1237]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1237]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1237]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1237"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:32.767475"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:32.767475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:32 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:33.209805"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:33.209805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1479]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1479) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 43.2ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1238", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 12:39:33.562918"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:33.562918"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:33.564086"], ["group_id", 1238], ["person_id", 1480], ["role", ""], ["updated_at", "2014-10-13 12:39:33.564086"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1480]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:33.565506' WHERE "people"."id" = 1480 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1238]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:33.567179' WHERE "groups"."id" = 1238  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/marco-polo/image/edit Completed 302 Found in 20ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.7ms | ActiveRecord: 0.5ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64360/people/marco-polo?cache_bust=1413203973 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413203973" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413203973", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1479]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1480) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1237, 1238) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1237, 1238) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:33.787526"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:33.787526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1481]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1481) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.6ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 48.0ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 12:39:33.910063"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:33.910063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1482) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.8ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1481]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1482) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.0ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:33.995079"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:33.995079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1483]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1483) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:34.047421"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:34.047421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1239]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1239]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1239]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1239"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:34.055653"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:34.055653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0163' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:34.060274"], ["slug", "surname-0163"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 12:39:34.060274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:34.063183"], ["group_id", 1240], ["person_id", 1484], ["updated_at", "2014-10-13 12:39:34.063183"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1484]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:34.064722' WHERE "people"."id" = 1484 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:34.065427' WHERE "groups"."id" = 1240  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0163" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0163"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0163' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1484) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1239, 1240) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1239, 1240) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.4ms) Started GET "/people/surname-0163/reported_profiles/new" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0163"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0163' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 21ms (Views: 18.3ms | ActiveRecord: 0.6ms) Started POST "/people/surname-0163/reported_profiles" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0163"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0163' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1484]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 1483], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.285@digital.justice.gov.uk"], ["subject_id", 1484]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.6ms Sent mail to example.user.285@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 13:39:34 +0100 From: support@example.com To: example.user.285@digital.justice.gov.uk Message-ID: <543bc8061f737_fad33fcebd465bec637a@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0163 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0163 Redirected to http://www.example.com/people/surname-0163 Completed 302 Found in 19ms (ActiveRecord: 1.3ms) Started GET "/people/surname-0163" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0163"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1483]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0163' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1484) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1239, 1240) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1239, 1240) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:34.182447"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:34.182447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1485]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1485]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1485]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1485) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 39.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0164' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:34.236947"], ["slug", "surname-0164"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 12:39:34.236947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0164/edit" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1485]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1486) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:34.293707"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:34.293707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1487]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1487]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1487]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1487) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1487]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 34ms (Views: 31.5ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1487]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.3ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:34.444083"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:34.444083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1488]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 20ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1488) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 38.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:34.497599"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:34.497599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:34.500162"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 12:39:34.500162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1490) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1490) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 1490) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1489]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 1.7ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1490) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1490 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:34.590671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 12ms (ActiveRecord: 2.2ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1488]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1490) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:34.625069"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:34.625069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1241]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1241]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1241]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1241"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:34.630978"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:34.630978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:34.634548"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:34.634548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:34 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:35.080329"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:35.080329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1492]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1492) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.8ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 44.4ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1242", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1491]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 11.9ms | ActiveRecord: 1.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1242"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413203975-64211-9197/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 12:39:35.527506"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-67488745-89e9-4953-8762-0141109446b8"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:35.527506"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:35.528530"], ["group_id", 1242], ["person_id", 1493], ["role", ""], ["updated_at", "2014-10-13 12:39:35.528530"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1493]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:35.529940' WHERE "people"."id" = 1493 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1242]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:35.531426' WHERE "groups"."id" = 1242  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/marco-polo-67488745-89e9-4953-8762-0141109446b8/image/edit Completed 302 Found in 16ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo-67488745-89e9-4953-8762-0141109446b8/image/edit" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-67488745-89e9-4953-8762-0141109446b8"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-67488745-89e9-4953-8762-0141109446b8' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.5ms | ActiveRecord: 0.5ms) Started PUT "/people/marco-polo-67488745-89e9-4953-8762-0141109446b8/image" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-67488745-89e9-4953-8762-0141109446b8"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-67488745-89e9-4953-8762-0141109446b8' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64360/people/marco-polo-67488745-89e9-4953-8762-0141109446b8?cache_bust=1413203975 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-67488745-89e9-4953-8762-0141109446b8?cache_bust=1413203975" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413203975", "id"=>"marco-polo-67488745-89e9-4953-8762-0141109446b8"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1492]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-67488745-89e9-4953-8762-0141109446b8' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1493) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1241, 1242) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1241, 1242) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 1.5ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:35.749265"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:35.749265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1494]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1494) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 39.2ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 12:39:35.809083"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:35.809083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1495) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.6ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1495) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 47.9ms | ActiveRecord: 1.5ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1495) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 1495) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 1495 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:35.908162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 15ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1494]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1495) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:35.948644"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:35.948644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1496]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1496]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1496]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1496) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:35 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1496]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 36.5ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:36.048222"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:36.048222"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1497]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1497) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 39.9ms | ActiveRecord: 1.6ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:36.105607"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:36.105607"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 45.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1498]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1497]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 17ms (Views: 15.1ms | ActiveRecord: 0.2ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:36.226029"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:36.226029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1243]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1243]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1243]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1243"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:36.231057"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:36.231057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0165' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:36.233829"], ["slug", "surname-0165"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 12:39:36.233829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:36.675286"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:36.675286"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1500]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1500) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.5ms | ActiveRecord: 0.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0165/edit" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0165"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1499) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0165" for 127.0.0.1 at 2014-10-13 13:39:36 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0165", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1243", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0165"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1499) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0165' AND "people"."given_name" = '' AND ("people"."id" != 1499) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 1499 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 12:39:37.008162"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.009569"], ["group_id", 1243], ["person_id", 1499], ["role", ""], ["updated_at", "2014-10-13 12:39:37.009569"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1499]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:37.011486' WHERE "people"."id" = 1499 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1243]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:37.012971' WHERE "groups"."id" = 1243  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/people/surname-0165 Completed 302 Found in 19ms (ActiveRecord: 3.0ms) Started GET "/people/surname-0165" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0165"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1499) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1243) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1243) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0165/edit" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0165"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1499) ORDER BY groups.name Peoplefinder::Group Load (1.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1243) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1243) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1499]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (43.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 65ms (Views: 56.7ms | ActiveRecord: 2.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1500]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.258064"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.258064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1501]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1501]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1501]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1501) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.305804"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-d7418360-76a4-4361-bf69-ae5babb1234c"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 12:39:37.305804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1502]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1502 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:37.311140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.322000"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:37.322000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1245]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1245]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1245]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1245"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:37.327480"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:37.327480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:37.329890"], ["group_id", 1246], ["person_id", 1502], ["updated_at", "2014-10-13 12:39:37.329890"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1502]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:37.331494' WHERE "people"."id" = 1502 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:37.332277' WHERE "groups"."id" = 1246  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-d7418360-76a4-4361-bf69-ae5babb1234c" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-d7418360-76a4-4361-bf69-ae5babb1234c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1501]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d7418360-76a4-4361-bf69-ae5babb1234c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1502) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1245, 1246) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1245, 1246) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.365206"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.365206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1503]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1503]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1503]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1503) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.413282"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-68e6efeb-1d24-4842-8fc2-024ae8c5c8a1"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 12:39:37.413282"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-68e6efeb-1d24-4842-8fc2-024ae8c5c8a1" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-68e6efeb-1d24-4842-8fc2-024ae8c5c8a1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1503]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-68e6efeb-1d24-4842-8fc2-024ae8c5c8a1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1504) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.444050"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.444050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1505]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1505]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1505]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1505) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 49.0ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.508010"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 12:39:37.508010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1506]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1506 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 12:39:37.513394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.526340"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:37.526340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1247]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1247]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1247]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1247"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:37.531155"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:37.531155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:37.533280"], ["group_id", 1248], ["person_id", 1506], ["updated_at", "2014-10-13 12:39:37.533280"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1506]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:37.534659' WHERE "people"."id" = 1506 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:37.535338' WHERE "groups"."id" = 1248  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1505]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1506) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1247, 1248) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1247, 1248) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.571401"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.571401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1507]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1507) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.625473"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 12:39:37.625473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1508) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.6ms | ActiveRecord: 1.1ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.0ms | ActiveRecord: 0.7ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 1508], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:37.678247"], ["updated_at", "2014-10-13 12:39:37.678247"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "eb48afe5-dc76-4371-9bc0-a8954a306b34"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 12.7ms Sent mail to someone.else@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 13:39:37 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bc809a831a_fad33fcebd465bec6447@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/eb48afe5-dc76-4371-9bc0-a8954a306b34?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 23ms (ActiveRecord: 1.5ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1508) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.727461"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.727461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1509]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1509]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1509]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1509) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (17.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 54ms (Views: 48.0ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.790457"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 12:39:37.790457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 1510 [["email", nil], ["updated_at", "2014-10-13 12:39:37.791757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1509]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1510) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.820583"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:37.820583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.828669"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.828669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1511]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1511]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1511) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:37.895996"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 12:39:37.895996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0172' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:37.899934"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0172"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 12:39:37.899934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.910015"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.910015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1514]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1514]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1514]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1514) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1514]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.7ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:37.984464"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:37.984464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1515]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1515) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 47.7ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 13.6ms | ActiveRecord: 0.4ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:38.077159"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 12:39:38.077159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1250) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1250) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1250]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1250' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1250' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1250]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 1.9ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1250) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1250) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms)  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1250' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1250' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:38.140444"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:38.140444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1251"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:38.145771"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:38.145771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1251/1252"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:38.150913"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:38.150913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:38.595389"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:38.595389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1516]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1516) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1253) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1251, 1252, 1253) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1253]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1251/1252/1253' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1251/1252/1253' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1253]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1253) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1251, 1252, 1253) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1252]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1251, 1252) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (12.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1251/1252/1253' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 20.5ms | ActiveRecord: 2.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1251", "team_email_address"=>"example.user.298@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1253) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1253) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1253) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1251/1252/1253/%' OR "groups"."ancestry" = '1251/1252/1253')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 1253 [["ancestry", "1251"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 12:39:38.965051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.9ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 13:39:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1516]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1253) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1251, 1253) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1253]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1251/1253' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1251/1253' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1253]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.4ms | ActiveRecord: 2.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1253]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1251]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:39.060948"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:39.060948"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1517]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1517]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1517]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1517) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1517]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.7ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1517]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 12:39:39.132183"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 12:39:39.132183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1517]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1254) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1254) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1254]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1254' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1254' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1254]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:39.164829"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:39.164829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1518]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1518]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1518]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1518) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:39.213240"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:39.213240"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1255"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:39.218465"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:39.218465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0094/edit" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1518]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0094' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1256) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1255, 1256) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1255]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1255) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1255/1256' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 17.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:39.254879"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:39.254879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1519]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1519]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1519]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1519) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:39.304968"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:39.304968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1257]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1257]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1257]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1257"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:39.309750"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:39.309750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1257]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1519]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1257) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1257) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1257' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1257' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 15.2ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:39.347322"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:39.347322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:39.790878"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:39.790878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1520]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1520) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1259) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1259) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1259]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1259' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1259' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1259]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 2.0ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 13:39:39 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.9ms | ActiveRecord: 0.6ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"1259", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1259]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1259]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1259]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1259]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1259"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:40.066144"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 12:39:40.066144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/teams/csg Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1260) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1259, 1260) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1260]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1259/1260' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1259/1260' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1260]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1259]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:40.156545"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:40.156545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1521]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1521]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1521]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1521) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0173' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:40.202036"], ["slug", "surname-0173"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 12:39:40.202036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:40.208891"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.208891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1261"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:40.213795"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.213795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:40.215213"], ["group_id", 1262], ["person_id", 1522], ["updated_at", "2014-10-13 12:39:40.215213"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 12:39:40.215936' WHERE "people"."id" = 1522 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 12:39:40.216564' WHERE "groups"."id" = 1262  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0096/edit" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0096"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1521]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0096' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1262) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1261, 1262) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1261]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1261) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1261/1262' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 16.3ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:40.254654"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:40.254654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1523]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1523]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1523]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1523) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:40.314768"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.314768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1263"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:40.319632"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.319632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0097/edit" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0097"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1523]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0097' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1264) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1263, 1264) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (3.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1263) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (50.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1263/1264' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 69ms (Views: 61.7ms | ActiveRecord: 2.4ms) Started DELETE "/teams/group-0097" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0097"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1523]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0097' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1264) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1263]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1263/1264/%' OR "groups"."ancestry" = '1263/1264')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1263/1264' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1264]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 10ms (ActiveRecord: 2.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1523]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1263) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1263) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1263]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1263' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1263' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1263]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1264]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:40.441574"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:40.441574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1524]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:40.497232"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.497232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1265]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1265]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1265]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1265"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:40.504524"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.504524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1266) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1265, 1266) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1266]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1265/1266' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1265/1266' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1266]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.2ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 14.1ms | ActiveRecord: 0.5ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1266", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1266]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1266]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1266]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1266]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1265/1266"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:40.561206"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 12:39:40.561206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 10ms (ActiveRecord: 2.1ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1524]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1267) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1265, 1266, 1267) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1267]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1265/1266/1267' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1265/1266/1267' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1267]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1266]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:40.602564"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.602564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1268]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1268]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1268]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1268"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:40.609421"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.609421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1268/1269"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:40.615650"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:40.615650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:41.055051"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:41.055051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1525]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1525) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1270) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1268, 1269, 1270) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1268/1269/1270' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1268/1269/1270' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1270) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1268, 1269, 1270) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1268, 1269) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1268/1269/1270' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.2ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1269", "team_email_address"=>"example.user.312@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1270) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1270) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1270) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1270 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 12:39:41.399611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/teams/cyberdigital-cyberservices Completed 302 Found in 11ms (ActiveRecord: 2.4ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1270) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1268, 1269, 1270) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1268/1269/1270' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1268/1269/1270' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1270]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1269]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:41.492276"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:41.492276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1271]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1271]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1271]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1271"], ["ancestry_depth", 1], ["created_at", "2014-10-13 12:39:41.497057"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 12:39:41.497057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64360/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 12:39:41.942395"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 12:39:41.942395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1526]] Redirected to http://127.0.0.1:64360/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 13:39:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1526) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 35ms (Views: 30.0ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:42 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 13:39:42 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 13:39:42 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 13:39:42 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1272", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1272]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1272]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1272]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1272]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1271/1272"], ["ancestry_depth", 2], ["created_at", "2014-10-13 12:39:42.178601"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 12:39:42.178601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64360/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 13:39:42 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1526]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1273) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1271, 1272, 1273) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1271/1272/1273' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1271/1272/1273' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.269391"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 12:39:42.269391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.272989"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 12:39:42.272989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1528"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1527]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1528' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1528]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.281586"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 12:39:42.281586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.284009"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 12:39:42.284009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1530"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1529]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1530' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1530]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.293337"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 12:39:42.293337"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.296233"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 12:39:42.296233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1532"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1531]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1532' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1532]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.304088"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 12:39:42.304088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.307004"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 12:39:42.307004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"1534"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1533]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1534' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1534]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 1534], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:42.315188"], ["updated_at", "2014-10-13 12:39:42.315188"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "6347fe16-3244-46e5-89a4-ebd07fdc9e22"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 8.3ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 13:39:42 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bc80e4e7ff_fad33fcebd465bec65ba@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/6347fe16-3244-46e5-89a4-ebd07fdc9e22?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.330293"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 12:39:42.330293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.332757"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 12:39:42.332757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"1536"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1535]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1536' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1536]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 1536], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 12:39:42.341801"], ["updated_at", "2014-10-13 12:39:42.341801"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "749e84aa-0b82-442f-965b-a3d297ab1d2f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 8.3ms Sent mail to someone.else@digital.justice.gov.uk (4.5ms) Date: Mon, 13 Oct 2014 13:39:42 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bc80e54f2e_fad33fcebd465bec66d7@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/749e84aa-0b82-442f-965b-a3d297ab1d2f?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.357190"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 12:39:42.357190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 12:39:42.360615"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 12:39:42.360615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"1538"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1537]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1538' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1538]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.174971"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 13:19:46.174971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.184262"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 13:19:46.184262"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.199761"], ["event", "create"], ["item_id", 1540], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0002\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.216169"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.216169"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.219201"], ["event", "create"], ["item_id", 1274], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.2@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1274]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1274]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1274]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1274"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.224425"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.224425"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.226409"], ["event", "create"], ["item_id", 1275], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0001\nteam_email_address:\n- \n- example.user.1@digital.justice.gov.uk\nancestry:\n- \n- '1274'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.228160"], ["group_id", 1275], ["person_id", 1540], ["updated_at", "2014-10-13 13:19:46.228160"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.232948"], ["event", "create"], ["item_id", 253], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1540\ngroup_id:\n- \n- 1275\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:46.233677' WHERE "people"."id" = 1540 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:46.234440' WHERE "groups"."id" = 1275  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.5ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"142"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1539]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 142]] Redirected to http://test.host/audit_trail Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 253]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.249242"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 13:19:46.249242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.251657"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 13:19:46.251657"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.253358"], ["event", "create"], ["item_id", 1542], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0004\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"143"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1541]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 143]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1542]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1542]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1542]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.265740"], ["event", "destroy"], ["item_id", 1542], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1542\ngiven_name: \nsurname: Surname-0004\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:19:46.251657000 Z\nupdated_at: 2014-10-13 13:19:46.251657000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0003"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1542], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 13ms (ActiveRecord: 1.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1542]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.273339"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 13:19:46.273339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.275722"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 13:19:46.275722"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.277295"], ["event", "create"], ["item_id", 1544], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1544]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1544]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.281281"], ["event", "destroy"], ["item_id", 1544], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1544\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 13:19:46.275722000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1544], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"146"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1543]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 146]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1544]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1544) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.275722"], ["id", 1544], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 13:19:46.289408"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.291383"], ["event", "create"], ["item_id", 1544], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.297364"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 13:19:46.297364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.299903"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 13:19:46.299903"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.301552"], ["event", "create"], ["item_id", 1546], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0007\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.310681"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.310681"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.312561"], ["event", "create"], ["item_id", 1276], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.4@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1276]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1276]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1276]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1276"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.317252"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.317252"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.319023"], ["event", "create"], ["item_id", 1277], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0002\nteam_email_address:\n- \n- example.user.3@digital.justice.gov.uk\nancestry:\n- \n- '1276'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.320294"], ["group_id", 1277], ["person_id", 1546], ["updated_at", "2014-10-13 13:19:46.320294"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.321653"], ["event", "create"], ["item_id", 254], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 1546\ngroup_id:\n- \n- 1277\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:46.322314' WHERE "people"."id" = 1546 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:46.322949' WHERE "groups"."id" = 1277  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 254]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.324953"], ["event", "destroy"], ["item_id", 254], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 254\ngroup_id: 1277\nperson_id: 1546\nrole: \ncreated_at: &1 2014-10-13 13:19:46.320294000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 254], ["item_type", "Peoplefinder::Membership"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:46.326451' WHERE "people"."id" = 1546 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:46.327009' WHERE "groups"."id" = 1277  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"152"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1545]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 152]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 254]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.357476"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:46.357476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1547]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1547]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 13ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1547) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (65.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (74.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.3ms) Completed 200 OK in 205ms (Views: 194.6ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.577146"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.577146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1278"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.583188"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.583188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1279]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1279]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1279]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1278/1279"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:46.589217"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.589217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1278]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1278"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.596034"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.596034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1281]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1281]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1281]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1278/1281"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:46.601597"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.601597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.604537"], ["slug", "surname-0008"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 13:19:46.604537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.606226"], ["group_id", 1280], ["person_id", 1548], ["updated_at", "2014-10-13 13:19:46.606226"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:46.606943' WHERE "people"."id" = 1548 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:46.607623' WHERE "groups"."id" = 1280  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.608837"], ["group_id", 1282], ["person_id", 1548], ["updated_at", "2014-10-13 13:19:46.608837"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:46.609490' WHERE "people"."id" = 1548 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:46.610071' WHERE "groups"."id" = 1282  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1547]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1282) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1278, 1281, 1282) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.7ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1282]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (8.8ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1278/1281/1282' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1278/1281/1282' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1282]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 29.1ms | ActiveRecord: 2.9ms) Started GET "/people/surname-0008" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0008"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0008' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1548) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1282]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1278, 1279, 1280) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1278, 1281, 1282) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1278, 1279, 1280) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1278, 1281, 1282) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.693616"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:46.693616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1549]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1549]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1549) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 30.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.741212"], ["slug", "surname-0009"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 13:19:46.741212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0009" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0009"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1549]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0009' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1550) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.766273"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:46.766273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1551]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1551]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1551) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0010' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.814613"], ["slug", "surname-0010"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 13:19:46.814613"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0010" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0010"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1551]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0010' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 7.9ms | ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.858703"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.858703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1283]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1283]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1283]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1283"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.867191"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.867191"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (15.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 20.8ms | ActiveRecord: 3.2ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.920859"], ["updated_at", "2014-10-13 13:19:46.920859"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "9e72dca4-959d-432b-97c2-4d849d08ccac"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 12.1ms Sent mail to james.darling@digital.justice.gov.uk (9.9ms) Date: Mon, 13 Oct 2014 14:19:46 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bd172e5a2c_fbaf3fdb35c65bec81451@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/9e72dca4-959d-432b-97c2-4d849d08ccac If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 6.7ms | ActiveRecord: 0.7ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:46.967635"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.967635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1285]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1285]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1285]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1285"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:46.973305"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:46.973305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:46.977707"], ["updated_at", "2014-10-13 13:19:46.977707"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "2b4ecf47-1d10-4c92-adae-d614f9c77ba9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/2b4ecf47-1d10-4c92-adae-d614f9c77ba9" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"2b4ecf47-1d10-4c92-adae-d614f9c77ba9"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '2b4ecf47-1d10-4c92-adae-d614f9c77ba9' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:46.985853"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 13:19:46.985853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1553]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1553]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:46 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1553) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.8ms | ActiveRecord: 1.2ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.061305"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.061305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1287]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1287]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1287]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1287"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.065762"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.065762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.068308"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 13:19:47.068308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:47.073213"], ["updated_at", "2014-10-13 13:19:47.073213"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d572e206-a99a-43ee-ad58-8b14bab76d72"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1554]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 14.8ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:19:47 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17314e4d_fbaf3fdb35c65bec81586@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d572e206-a99a-43ee-ad58-8b14bab76d72?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/d572e206-a99a-43ee-ad58-8b14bab76d72?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"d572e206-a99a-43ee-ad58-8b14bab76d72"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'd572e206-a99a-43ee-ad58-8b14bab76d72' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 5ms (ActiveRecord: 0.8ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1554]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.152689"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.152689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1289]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1289]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1289]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1289"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.157612"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.157612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.161150"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:19:47.161150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:47.165929"], ["updated_at", "2014-10-13 13:19:47.165929"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "0f56c309-415b-4f8f-9a09-20a454244625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/0f56c309-415b-4f8f-9a09-20a454244625" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"0f56c309-415b-4f8f-9a09-20a454244625"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '0f56c309-415b-4f8f-9a09-20a454244625' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1555]] Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1555]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1555]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1555) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.232420"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.232420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1291]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1291]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1291]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1291"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.236907"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.236907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:47.240783"], ["updated_at", "2014-10-13 13:19:47.240783"], ["user_email", "example.user.20@digital.justice.gov.uk"], ["value", "21a5ef15-7208-4711-97b2-7498bbc2b98e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/21a5ef15-7208-4711-97b2-7498bbc2b98e" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"21a5ef15-7208-4711-97b2-7498bbc2b98e"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '21a5ef15-7208-4711-97b2-7498bbc2b98e' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.20@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-20' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.249037"], ["email", "example.user.20@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-20"], ["surname", "user"], ["updated_at", "2014-10-13 13:19:47.249037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1556]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1556]] Redirected to http://www.example.com/people/example-user-20/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/example-user-20/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-20"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1556]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-20' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1556) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (11.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (11.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (12.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 51ms (Views: 46.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.320038"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.320038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1293]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1293]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1293]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1293"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.324770"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.324770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.364480"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.364480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1295]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1295]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1295]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1295"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.371280"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.371280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.9ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 5.9ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.413065"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:47.413065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1557]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1557) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 44ms (Views: 39.1ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.465441"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:19:47.465441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1558) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1558) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1558]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.522575"], ["event", "destroy"], ["item_id", 1558], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1558\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:19:47.465441000 Z\nupdated_at: 2014-10-13 13:19:47.465441000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1558], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 11ms (ActiveRecord: 2.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (12.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 19.1ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1558]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 15.9ms | ActiveRecord: 1.0ms)  (0.4ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/153" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"153"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 153]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1558]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1558) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.465441"], ["given_name", "Greg"], ["id", 1558], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:19:47.589440"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.591746"], ["event", "create"], ["item_id", 1558], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1557]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1558]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1558]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.8ms)  (0.4ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.616472"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:47.616472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1559]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1559) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.7ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.0ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:47.701791"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 13:19:47.701791"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.704078"], ["event", "create"], ["item_id", 1297], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1297) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1297) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1297]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1297' ORDER BY "groups"."name" ASC CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1297' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1297]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 2.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1559]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1297]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.752624"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:47.752624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1560]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1560) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:47.805016"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.805016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1298]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1298]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1298]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1298"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:47.810069"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:47.810069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:47.812960"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:19:47.812960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.816235"], ["group_id", 1299], ["leader", "t"], ["person_id", 1561], ["role", "Jefe"], ["updated_at", "2014-10-13 13:19:47.816235"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1561]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:47.818296' WHERE "people"."id" = 1561 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:47.819160' WHERE "groups"."id" = 1299  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1561) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1298, 1299) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1298, 1299) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1561]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 40.5ms | ActiveRecord: 1.8ms) Started DELETE "/memberships/257?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"257"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 257]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:47.878889"], ["event", "destroy"], ["item_id", 257], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 257\ngroup_id: 1299\nperson_id: 1561\nrole: Jefe\ncreated_at: 2014-10-13 13:19:47.816235000 Z\nupdated_at: 2014-10-13 13:19:47.816235000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 257], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1561]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:47.881367' WHERE "people"."id" = 1561 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1299]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:47.882828' WHERE "groups"."id" = 1299  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1561) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:47 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1560]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 257]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1561]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1299]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:49.026391"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:49.026391"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:49.029598"], ["event", "create"], ["item_id", 1300], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.28@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1300]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1300]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1300]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1300"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:49.035306"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:49.035306"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:49.037311"], ["event", "create"], ["item_id", 1301], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.27@digital.justice.gov.uk\nancestry:\n- \n- '1300'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:49.042072"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:19:49.042072"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:49.044517"], ["event", "create"], ["item_id", 1562], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:49.546244"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:49.546244"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:49.548545"], ["event", "create"], ["item_id", 1563], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1563]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1563) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1562) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"1301", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1562) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 1562) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1562 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:19:49.834363"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:49.839329"], ["event", "update"], ["item_id", 1562], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1562\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:19:49.042072000 Z\nupdated_at: 2014-10-13 13:19:49.042072000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:49.840386"], ["group_id", 1301], ["person_id", 1562], ["role", "Jefe"], ["updated_at", "2014-10-13 13:19:49.840386"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:49.842921"], ["event", "create"], ["item_id", 258], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 1301\nperson_id:\n- \n- 1562\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1562]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:49.844389' WHERE "people"."id" = 1562 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1301]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:49.845835' WHERE "groups"."id" = 1301  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/bob Completed 302 Found in 23ms (ActiveRecord: 3.1ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1562) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1300, 1301) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1300, 1301) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 1.5ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:49 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 258]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1562]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1301]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1562]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1563]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1562]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1301]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1300]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 15.0ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.021318"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:50.021318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1564]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1564) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.070885"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.070885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1302"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:50.075772"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.075772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1303) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1302, 1303) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1302) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (20.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1302/1303' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 29.9ms | ActiveRecord: 2.4ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1303) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1302]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1302/1303/%' OR "groups"."ancestry" = '1302/1303')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1302/1303' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1303]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.129547"], ["event", "destroy"], ["item_id", 1303], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1303\nname: original name\ncreated_at: 2014-10-13 13:19:50.075772000 Z\nupdated_at: 2014-10-13 13:19:50.075772000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '1302'\nancestry_depth: 1\nteam_email_address: example.user.29@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1303], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1302) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1302) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1302]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1302' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1302' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1302]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1564]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1303]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 6.6ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.173558"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:50.173558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1565]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1565) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.223461"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.223461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1304"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:50.228333"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.228333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1305) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1304, 1305) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1304) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1304/1305' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.9ms | ActiveRecord: 2.1ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"1304", "team_email_address"=>"example.user.31@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1305) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1304]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1305) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 1305) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1305 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 13:19:50.270016"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:50.273318"], ["event", "update"], ["item_id", 1305], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1305\nname: original name\ncreated_at: 2014-10-13 13:19:50.228333000 Z\nupdated_at: 2014-10-13 13:19:50.228333000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '1304'\nancestry_depth: 1\nteam_email_address: example.user.31@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 15ms (ActiveRecord: 2.9ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1305) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1304, 1305) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1305]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1304/1305' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1304/1305' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1305]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1565]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1305]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.317299"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:50.317299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1566]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1566) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:50.361038"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 13:19:50.361038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1567) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1567) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 1567) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1567 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 13:19:50.418911"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:50.422549"], ["event", "update"], ["item_id", 1567], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1567\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:19:50.361038000 Z\nupdated_at: 2014-10-13 13:19:50.361038000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 15ms (ActiveRecord: 2.1ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1567) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1567]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.9ms) Started POST "/audit_trail/undo/165" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"165"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 165]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1567]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1567) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1567 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 13:19:50.474654"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:50.477890"], ["event", "update"], ["item_id", 1567], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1567\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:19:50.361038000 Z\nupdated_at: 2014-10-13 13:19:50.418911000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1566]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1567]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1567]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1567]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.502140"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:50.502140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1568]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1568) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:50.545864"], ["slug", "surname-0012"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 13:19:50.545864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0012/edit" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0012"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0012' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1569) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 41ms (Views: 36.1ms | ActiveRecord: 1.1ms) Started PATCH "/people/surname-0012" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0012", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0012"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0012' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1569) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0012' AND "people"."given_name" = '' AND ("people"."id" != 1569) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1569]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 1569 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:19:50.610008"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:50.618148"], ["event", "update"], ["item_id", 1569], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1569\ngiven_name: \nsurname: Surname-0012\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 13:19:50.545864000 Z\nupdated_at: 2014-10-13 13:19:50.545864000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1569\n given_name: ''\n surname: Surname-0012\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 13:19:50.610008000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0012\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1569\n given_name: ''\n surname: Surname-0012\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 13:19:50.545864000 Z\n updated_at: &2 2014-10-13 13:19:50.610008000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0012\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1569\n given_name: ''\n surname: Surname-0012\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0012\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70210808362280\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1569\n given_name: ''\n surname: Surname-0012\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0012\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206390-64431-7309\n cache_id: 1413206390-64431-7309\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206390-64431-7309/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70210808358580\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1569\n given_name: ''\n surname: Surname-0012\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0012\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206390-64431-7309\n cache_id: 1413206390-64431-7309\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206390-64431-7309/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413206390-64431-7309\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206390-64431-7309/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0012/image/edit Completed 302 Found in 24ms (ActiveRecord: 2.8ms) Started GET "/people/surname-0012/image/edit" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0012"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0012' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1568]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1569]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.665414"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:50.665414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1570]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1570) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.6ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:19:50.777254"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:19:50.777254"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.779800"], ["event", "create"], ["item_id", 1571], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 21ms (ActiveRecord: 1.5ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1571) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1571]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/168" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]] Peoplefinder::Version Load (0.1ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 168]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1571]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1571]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1571]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:50.823741"], ["event", "destroy"], ["item_id", 1571], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1571\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:19:50.777254000 Z\nupdated_at: 2014-10-13 13:19:50.777254000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1571], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:19:50 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1570]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1571]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1571]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.4ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:50.845732"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 13:19:50.845732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0014' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.850948"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0014"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 13:19:50.850948"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.857325"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 13:19:50.857325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.860202"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 13:19:50.860202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1575"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1574]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1575' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1575]] Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.874601"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 13:19:50.874601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.878304"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 13:19:50.878304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1577"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1576]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1577' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1577]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.886204"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 13:19:50.886204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.888627"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 13:19:50.888627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"1579"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1578]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1579' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1579]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.897715"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 13:19:50.897715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.900357"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 13:19:50.900357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.907317"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.907317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1306]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1306]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1306]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1306"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:50.911961"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.911961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:50.914145"], ["group_id", 1307], ["person_id", 1581], ["updated_at", "2014-10-13 13:19:50.914145"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1581]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:50.915656' WHERE "people"."id" = 1581 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:50.916348' WHERE "groups"."id" = 1307  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1581"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1580]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1581' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1581]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1581]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1580], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.33@digital.justice.gov.uk"], ["subject_id", 1581]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 9.0ms Sent mail to example.user.33@digital.justice.gov.uk (5.5ms) Date: Mon, 13 Oct 2014 14:19:50 +0100 From: support@example.com To: example.user.33@digital.justice.gov.uk Message-ID: <543bd176e52d7_fbaf3fdb35c65bec81653@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0021 has said that they believe the information on Surname-0022 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 26ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.948269"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 13:19:50.948269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.951142"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 13:19:50.951142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.958537"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.958537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1308]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1308]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1308"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:50.963336"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:50.963336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:50.965477"], ["group_id", 1309], ["person_id", 1583], ["updated_at", "2014-10-13 13:19:50.965477"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1583]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:50.966988' WHERE "people"."id" = 1583 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:50.967663' WHERE "groups"."id" = 1309  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1583"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1582]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1583' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1583]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1583]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1582], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.35@digital.justice.gov.uk"], ["subject_id", 1583]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.1ms Sent mail to example.user.35@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:19:50 +0100 From: support@example.com To: example.user.35@digital.justice.gov.uk Message-ID: <543bd176efd83_fbaf3fdb35c65bec81780@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0023 has said that they believe the information on Surname-0024 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.991414"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 13:19:50.991414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:50.994602"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 13:19:50.994602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.002303"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.002303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1310]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1310]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1310]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1310"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.007023"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.007023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.009071"], ["group_id", 1311], ["person_id", 1585], ["updated_at", "2014-10-13 13:19:51.009071"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1585]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.010589' WHERE "people"."id" = 1585 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.011263' WHERE "groups"."id" = 1311  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1585"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1584]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1585' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1585]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1585]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1584], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.37@digital.justice.gov.uk"], ["subject_id", 1585]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.4ms Sent mail to example.user.37@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:19:51 +0100 From: support@example.com To: example.user.37@digital.justice.gov.uk Message-ID: <543bd1775efa_fbaf3fdb35c65bec81841@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0025 has said that they believe the information on Surname-0026 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.034010"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 13:19:51.034010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.036829"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 13:19:51.036829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.044409"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.044409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1312]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1312]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1312]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1312"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.049247"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.049247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.051396"], ["group_id", 1313], ["person_id", 1587], ["updated_at", "2014-10-13 13:19:51.051396"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1587]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.053046' WHERE "people"."id" = 1587 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.053816' WHERE "groups"."id" = 1313  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1587"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1586]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1587' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1587]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1587]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1586], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.39@digital.justice.gov.uk"], ["subject_id", 1587]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.5ms Sent mail to example.user.39@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:19:51 +0100 From: support@example.com To: example.user.39@digital.justice.gov.uk Message-ID: <543bd1771068c_fbaf3fdb35c65bec819f4@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0027 has said that they believe the information on Surname-0028 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.076447"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 13:19:51.076447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.078996"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 13:19:51.078996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.085988"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.085988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1314]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1314]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1314]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1314"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.090595"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.090595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.092899"], ["group_id", 1315], ["person_id", 1589], ["updated_at", "2014-10-13 13:19:51.092899"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1589]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.094304' WHERE "people"."id" = 1589 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.095021' WHERE "groups"."id" = 1315  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"1589"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1588]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1589' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1589]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1589]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 1588], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.41@digital.justice.gov.uk"], ["subject_id", 1589]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.7ms Sent mail to example.user.41@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:19:51 +0100 From: support@example.com To: example.user.41@digital.justice.gov.uk Message-ID: <543bd1771ae7f_fbaf3fdb35c65bec8207b@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0029 has said that they believe the information on Surname-0030 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1589]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.120835"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 13:19:51.120835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.123609"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 13:19:51.123609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"1591"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1590]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1591' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1591]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1591]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.3ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.138872"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.138872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1316]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1316]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1316]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1316"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.144455"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.144455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1317]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1317]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1317]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1316/1317"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.149870"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.149870"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1318]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1318]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1318]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1316/1317/1318"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.155099"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.155099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1316, 1317, 1318, 1319) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.163678"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.163678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1320]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1320]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1320]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1320"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.168531"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.168531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1321]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1321]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1321]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1320/1321"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.173927"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.173927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1322]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1322]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1322]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1320/1321/1322"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.179189"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.179189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0019' AND "groups"."id" != 1321) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.195550"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.195550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1324) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.202798"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.202798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1325]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1325]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1325]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1325"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.207743"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.207743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.223222"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.223222"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1327]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1327]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1327]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1327"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.228175"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.228175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1327/1328/%' OR "groups"."ancestry" = '1327/1328'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.244308"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.244308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1329]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1329]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1329]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1329"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.249860"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.249860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1329/1330/%' OR "groups"."ancestry" = '1329/1330')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1330]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1330]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.259228"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.259228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.265797"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.265797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1332"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.270753"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.270753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1332]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.279788"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.279788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1334]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1334]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1334"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.286423"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.286423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1334]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1334'  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.295560"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.295560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.302284"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.302284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1337'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.310439"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.310439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1338]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1338]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1338]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1338"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.315254"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.315254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.318227"], ["slug", "surname-0033"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 13:19:51.318227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.319531"], ["group_id", 1339], ["leader", "t"], ["person_id", 1592], ["updated_at", "2014-10-13 13:19:51.319531"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.320347' WHERE "people"."id" = 1592 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.320984' WHERE "groups"."id" = 1339  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 1339]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.330197"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.330197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1340]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1340]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1340]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1340"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.334982"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.334982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.338653"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:19:51.338653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.340671"], ["group_id", 1341], ["person_id", 1593], ["updated_at", "2014-10-13 13:19:51.340671"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.341243' WHERE "people"."id" = 1593 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1341]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.342565' WHERE "groups"."id" = 1341  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1341 OR "groups"."ancestry" ILIKE '1340/1341/%') OR "groups"."ancestry" = '1340/1341')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.2ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1341) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.352782"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.352782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1342]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1342]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1342]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1342"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.357461"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.357461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.360797"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:19:51.360797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.362831"], ["group_id", 1343], ["person_id", 1594], ["updated_at", "2014-10-13 13:19:51.362831"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.363443' WHERE "people"."id" = 1594 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1343]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.364762' WHERE "groups"."id" = 1343  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1343]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1343]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1343]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1342/1343"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.369599"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.369599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.372660"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:19:51.372660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.374719"], ["group_id", 1344], ["person_id", 1595], ["updated_at", "2014-10-13 13:19:51.374719"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.375441' WHERE "people"."id" = 1595 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1344]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.376908' WHERE "groups"."id" = 1344  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1343 OR "groups"."ancestry" ILIKE '1342/1343/%') OR "groups"."ancestry" = '1342/1343')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1343,1344) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.386468"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.386468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1345]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1345]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1345]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1345"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.391245"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.391245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.394427"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:19:51.394427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.396418"], ["group_id", 1346], ["person_id", 1596], ["updated_at", "2014-10-13 13:19:51.396418"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.397051' WHERE "people"."id" = 1596 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1346]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.398431' WHERE "groups"."id" = 1346  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1346]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1346]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1346]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1345/1346"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.403522"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.403522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.406615"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:19:51.406615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.408566"], ["group_id", 1347], ["person_id", 1597], ["updated_at", "2014-10-13 13:19:51.408566"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.409202' WHERE "people"."id" = 1597 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1347]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.410749' WHERE "groups"."id" = 1347  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.412417"], ["group_id", 1347], ["person_id", 1597], ["updated_at", "2014-10-13 13:19:51.412417"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.413053' WHERE "people"."id" = 1597 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1347]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.414265' WHERE "groups"."id" = 1347  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1346 OR "groups"."ancestry" ILIKE '1345/1346/%') OR "groups"."ancestry" = '1345/1346')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1346,1347) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.423693"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.423693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1348]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1348]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1348]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1348"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.430916"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.430916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.434774"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:19:51.434774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.436865"], ["group_id", 1349], ["person_id", 1598], ["updated_at", "2014-10-13 13:19:51.436865"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.437551' WHERE "people"."id" = 1598 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1349]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.438840' WHERE "groups"."id" = 1349  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1349]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1349]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1349]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1348/1349"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.443987"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.443987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.447098"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:19:51.447098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.449040"], ["group_id", 1350], ["person_id", 1599], ["updated_at", "2014-10-13 13:19:51.449040"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.449705' WHERE "people"."id" = 1599 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1350]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.450986' WHERE "groups"."id" = 1350  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.452745"], ["group_id", 1350], ["person_id", 1599], ["updated_at", "2014-10-13 13:19:51.452745"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.453456' WHERE "people"."id" = 1599 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1350]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.454720' WHERE "groups"."id" = 1350  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1349 OR "groups"."ancestry" ILIKE '1348/1349/%') OR "groups"."ancestry" = '1348/1349')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1349,1350) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.464144"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.464144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1351]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1351]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1351]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1351"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.468883"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.468883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1351/1352' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.476758"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.476758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1353]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1353]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1353]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1353"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.481400"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.481400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1353/1354' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.489235"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.489235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1355]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1355]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1355]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1355"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.495684"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.495684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1356]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1356]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1356]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1355/1356"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.501422"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.501422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1356]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1355/1356' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.509947"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.509947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1358]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1358]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1358]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1358"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.514628"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.514628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.517747"], ["slug", "surname-0034"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 13:19:51.517747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.519359"], ["group_id", 1359], ["person_id", 1600], ["updated_at", "2014-10-13 13:19:51.519359"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.520042' WHERE "people"."id" = 1600 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1359]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.521387' WHERE "groups"."id" = 1359  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1358/1359' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1359]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.531967"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.531967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1360]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1360"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.536581"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.536581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0035' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.539726"], ["slug", "surname-0035"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 13:19:51.539726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.542772"], ["group_id", 1361], ["person_id", 1601], ["updated_at", "2014-10-13 13:19:51.542772"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.543608' WHERE "people"."id" = 1601 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1361]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.545317' WHERE "groups"."id" = 1361  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1360/1361' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1361]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.557071"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.557071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1362]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1362]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1362]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1362"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.561602"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.561602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1362/1363' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1363]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.572018"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.572018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1364]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1364]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1364]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1364"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.576671"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.576671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.583725"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.583725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1366"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.588600"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.588600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1366]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1367) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 1367) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 1367 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 13:19:51.593573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1367]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.601651"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.601651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1368"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.606478"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.606478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1368) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1368 [["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.609503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1368]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1368"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.614783"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.614783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.622133"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.622133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1371"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.626611"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.626611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 [1mPeoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1371) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1371 [["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.629512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1371"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.635064"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.635064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1371) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1371 [["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.638294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1371]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1371"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.645230"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.645230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.650258"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 13:19:51.650258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0037' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.652965"], ["slug", "surname-0037"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 13:19:51.652965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.659343"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.659343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1375]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1375]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1375]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1375"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.677142"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.677142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.678640"], ["group_id", 1376], ["person_id", 1603], ["updated_at", "2014-10-13 13:19:51.678640"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.679334' WHERE "people"."id" = 1603 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.680006' WHERE "groups"."id" = 1376  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"276"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1602]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 276]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 276]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1603]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.685075' WHERE "people"."id" = 1603 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1376]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.686456' WHERE "groups"."id" = 1376  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 276]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.691479"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 13:19:51.691479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0039' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.694263"], ["slug", "surname-0039"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 13:19:51.694263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.700511"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.700511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1377]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1377]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1377]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1377"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.705195"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.705195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.706464"], ["group_id", 1378], ["person_id", 1605], ["updated_at", "2014-10-13 13:19:51.706464"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.707119' WHERE "people"."id" = 1605 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.707793' WHERE "groups"."id" = 1378  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"277"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1604]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 277]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 277]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1605]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.712569' WHERE "people"."id" = 1605 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1378]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.713858' WHERE "groups"."id" = 1378  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.718711"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 13:19:51.718711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1606]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.726677"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 13:19:51.726677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1607]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.734018"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 13:19:51.734018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.739962"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.739962"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1608]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.748563"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 13:19:51.748563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.754622"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.754622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1609]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.765720"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.765720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1381]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1381]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1381]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1381"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.770301"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.770301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1381/1382"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.775310"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.775310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1381/1382/1383"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.780491"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.780491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1383]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1381/1382/1383"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.785500"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.785500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1381/1382"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.790357"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.790357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1382]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.799743"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.799743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1387]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1387]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1387]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1387"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.804301"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.804301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1387/1388"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.809358"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.809358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1387/1388/1389"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.814493"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.814493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1389]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1387/1388/1389"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.819309"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.819309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1388]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1387/1388"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.824154"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.824154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1388 OR "groups"."ancestry" ILIKE '1387/1388/%') OR "groups"."ancestry" = '1387/1388')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.832077"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.832077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1393]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1393]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1393]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1393"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.836620"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.836620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1393/1394"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.841530"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.841530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1393/1394/1395"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.846295"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.846295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1395]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1393/1394/1395"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:51.851128"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.851128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1394]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1393/1394"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:51.856007"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.856007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1394 OR "groups"."ancestry" ILIKE '1393/1394/%') OR "groups"."ancestry" = '1393/1394')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.864908"], ["slug", "surname-0044"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 13:19:51.864908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.871317"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.871317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1399]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1399]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1399]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1399"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.876959"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.876959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.878562"], ["group_id", 1400], ["person_id", 1610], ["updated_at", "2014-10-13 13:19:51.878562"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.879360' WHERE "people"."id" = 1610 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.880089' WHERE "groups"."id" = 1400  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.883620"], ["slug", "surname-0045"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 13:19:51.883620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.889811"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.889811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1401]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1401]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1401]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1401"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.894520"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.894520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.896058"], ["group_id", 1402], ["person_id", 1611], ["updated_at", "2014-10-13 13:19:51.896058"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.896911' WHERE "people"."id" = 1611 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.897622' WHERE "groups"."id" = 1402  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.907561"], ["slug", "surname-0046"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 13:19:51.907561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:51.913971"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.913971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1403]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1403]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1403]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1403"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:51.918690"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:51.918690"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:51.920029"], ["group_id", 1404], ["person_id", 1612], ["updated_at", "2014-10-13 13:19:51.920029"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:51.920730' WHERE "people"."id" = 1612 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:51.921339' WHERE "groups"."id" = 1404  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:51.953156"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:51.953156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1613]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1613) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.000576"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.000576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1405]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1405]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1405]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1405"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.005875"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.005875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1406) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1405, 1406) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1406]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1405/1406' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1405/1406' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1406]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.3ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.6ms | ActiveRecord: 0.5ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1406", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1406]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1406]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1406]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1406]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1405/1406"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:52.054697"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:19:52.054697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1613]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1407) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1405, 1406, 1407) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (13.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (13.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (14.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1407]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1405/1406/1407' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1405/1406/1407' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1407]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 23.3ms | ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1406]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:52.100768"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:52.100768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1614]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1614]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1614]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1614) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.159402"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.159402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1408]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1408]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1408]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1408"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.164590"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.164590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1408]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1614]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1408) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1408) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1408' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1408' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:52.197778"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:52.197778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1615]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1615]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1615]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1615) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:52.243061"], ["slug", "surname-0047"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 13:19:52.243061"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.252710"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.252710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0048-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1410"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.257977"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.257977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:52.259380"], ["group_id", 1411], ["person_id", 1616], ["updated_at", "2014-10-13 13:19:52.259380"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:52.260047' WHERE "people"."id" = 1616 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:52.260695' WHERE "groups"."id" = 1411  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0048/edit" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0048"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1615]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0048' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1411) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1410, 1411) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1410]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1410) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1410/1411' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.9ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:52.298777"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:52.298777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1617]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1617) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.2ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:52.374911"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:19:52.374911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1412) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1412) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1412]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1412' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1412' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1412]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 2.2ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1412) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1412) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1412' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (16.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1412' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 32ms (Views: 24.7ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:52.446802"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:52.446802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1618]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1618]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1618]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1618) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.500913"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.500913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1413"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.506245"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.506245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0049/edit" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0049"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1618]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0049' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1414) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1413, 1414) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1413]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1413) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1413/1414' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.2ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:52.545247"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:52.545247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1619]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1619]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1619) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.596486"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.596486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1415"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.601795"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.601795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0050/edit" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0050"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0050' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1416) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1415, 1416) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1415) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1415/1416' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.7ms | ActiveRecord: 2.4ms) Started DELETE "/teams/group-0050" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0050"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0050' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1416) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1415]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1415/1416/%' OR "groups"."ancestry" = '1415/1416')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1415/1416' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1416]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.0ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1415) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1415) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1415]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1415' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1415' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1415]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1416]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:52.678878"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.678878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1417]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1417]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1417]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1417"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:52.684294"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.684294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1417/1418"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:52.689687"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:52.689687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:52 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:53.137480"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:53.137480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1620]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1620) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 40.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1419) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1417, 1418, 1419) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1419]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1417/1418/1419' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1417/1418/1419' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1419]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1419) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1417, 1418, 1419) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1417, 1418) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1417/1418/1419' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 18.4ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1418", "team_email_address"=>"example.user.147@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1419) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1419) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1419) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1419 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 13:19:53.478488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/teams/cyberdigital-cyberservices Completed 302 Found in 12ms (ActiveRecord: 2.8ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1620]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1419) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1417, 1418, 1419) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1419]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1417/1418/1419' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1417/1418/1419' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1419]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1419]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1418]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:53.573738"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:53.573738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1420]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1420]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1420]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1420"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:53.579430"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:53.579430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:53 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:54.011013"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:54.011013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1621]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1621) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1421", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1421]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1421]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1421]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1421]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1420/1421"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:54.243501"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:19:54.243501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1621]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1422) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1420, 1421, 1422) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1422]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1420/1421/1422' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1420/1421/1422' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1422]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:54.334482"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:54.334482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1622]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1622]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1622]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1622) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1622]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (9.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (10.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 21.0ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:54.414123"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:54.414123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1623]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1623]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1623]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1623) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1623]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1623]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:19:54.486226"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:19:54.486226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1623]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1423) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1423) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1423]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (4.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1423' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1423' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1423]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:54.523643"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:54.523643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1424"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:54.528999"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:54.528999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1424/1425"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:54.534040"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:54.534040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:54.966439"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:54.966439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1624]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1624) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1426) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1424, 1425, 1426) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1426]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1424/1425/1426' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1424/1425/1426' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1426]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 2.3ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1426) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1424, 1425, 1426) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1425]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1424, 1425) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1424/1425/1426' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.4ms | ActiveRecord: 2.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1424", "team_email_address"=>"example.user.152@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1426) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1426) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1426) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1424/1425/1426/%' OR "groups"."ancestry" = '1424/1425/1426')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 1426 [["ancestry", "1424"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 13:19:55.311427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1426) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1424, 1426) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1426]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1424/1426' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1424/1426' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1426]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 1.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1426]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1424]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:55.404225"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:55.404225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:55.839962"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:55.839962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1625]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1625) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:19:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1427) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1427) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1427]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1427' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1427' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1427]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.1ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"1427", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1427]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1427]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1427]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1427]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1427"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:56.110920"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:19:56.110920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/teams/csg Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1625]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1428) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1427, 1428) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1428]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1427/1428' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1427/1428' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1428]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1427]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:56.201563"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:56.201563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.204810"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:19:56.204810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:56.215586"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:19:56.215586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:56.219371"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:19:56.219371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.233688"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.233688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1429]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1429]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1429]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1429"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:56.239128"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.239128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0051" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0051"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:56.260536"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:56.260536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0051 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0051" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1630]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0051' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1430) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1429, 1430) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1430]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1429/1430' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1429/1430' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1430]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:56.301355"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:56.301355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1631]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1631]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1631]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1631) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (10.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 14.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.409349"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 13:19:56.409349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.416000"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.416000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1632]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.424030"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 13:19:56.424030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.426556"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 13:19:56.426556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1634"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1633]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1634' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1634]] Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.442056"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 13:19:56.442056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.444809"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 13:19:56.444809"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1636"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1635]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1636' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1636]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.452857"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 13:19:56.452857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.455253"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 13:19:56.455253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"1638"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1637]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1638' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1638]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.464018"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 13:19:56.464018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.466790"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 13:19:56.466790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"1640"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1639]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1640' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1640]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 1640], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.476048"], ["updated_at", "2014-10-13 13:19:56.476048"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "c8035e14-30e1-40bb-a398-c8b20b98f410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 12.0ms Sent mail to someone.else@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd17c76a61_fbaf3fdb35c65bec821f6@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/c8035e14-30e1-40bb-a398-c8b20b98f410?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 23ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.496703"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 13:19:56.496703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.499970"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 13:19:56.499970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"1642"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1641]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1642' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1642]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 1642], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.508764"], ["updated_at", "2014-10-13 13:19:56.508764"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "3f820e94-a1b6-461e-8272-7445c4a8141e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 8.5ms Sent mail to someone.else@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd17c7dcde_fbaf3fdb35c65bec82250@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/3f820e94-a1b6-461e-8272-7445c4a8141e?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.524281"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 13:19:56.524281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.527374"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 13:19:56.527374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"1644"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1643]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1644' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1644]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.538139"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 13:19:56.538139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.541938"], ["updated_at", "2014-10-13 13:19:56.541938"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "9fb0d1a7-e73b-462b-a929-104c82905a9a"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1645]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.2ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17c86528_fbaf3fdb35c65bec8233e@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/9fb0d1a7-e73b-462b-a929-104c82905a9a?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.559310"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 13:19:56.559310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.563294"], ["updated_at", "2014-10-13 13:19:56.563294"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "198829ab-c4c0-452c-ab63-8ad54a4e6527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1646]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.7ms Sent mail to test.user@digital.justice.gov.uk (5.7ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17c8bb2b_fbaf3fdb35c65bec82496@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/198829ab-c4c0-452c-ab63-8ad54a4e6527?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.581740"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 13:19:56.581740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.585755"], ["updated_at", "2014-10-13 13:19:56.585755"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "34676c5c-11ce-44da-8fe5-024fbebb7d5b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1647]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.2ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17c90ffe_fbaf3fdb35c65bec825e6@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/34676c5c-11ce-44da-8fe5-024fbebb7d5b?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.603038"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 13:19:56.603038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.607281"], ["updated_at", "2014-10-13 13:19:56.607281"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3bf8db8e-fc37-4b4e-a834-afffc1184eba"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1648]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 11.9ms Sent mail to test.user@digital.justice.gov.uk (6.7ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17c96bed_fbaf3fdb35c65bec826d4@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/3bf8db8e-fc37-4b4e-a834-afffc1184eba?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.627716"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 13:19:56.627716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.631759"], ["updated_at", "2014-10-13 13:19:56.631759"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "f1cc02e6-b0fa-434b-826a-972da1135193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1649]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.5ms Sent mail to test.user@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd17c9c49a_fbaf3fdb35c65bec82732@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/f1cc02e6-b0fa-434b-826a-972da1135193?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.648643"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:19:56.648643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.651118"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:19:56.651118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1651], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1650]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.5ms Sent mail to recipient@example.com (4.9ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd17ca0e18_fbaf3fdb35c65bec82827@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.668068"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:19:56.668068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.670826"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:19:56.670826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1653], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1652]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.5ms Sent mail to recipient@example.com (4.5ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd17ca59f7_fbaf3fdb35c65bec82931@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.686625"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:19:56.686625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.689295"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:19:56.689295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1655], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1654]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 17.1ms Sent mail to recipient@example.com (5.0ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd17cad37e_fbaf3fdb35c65bec830eb@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.718263"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:19:56.718263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.721153"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:19:56.721153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1657], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1656]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.3ms Sent mail to recipient@example.com (4.4ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd17cb1e4d_fbaf3fdb35c65bec83176@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.736603"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:19:56.736603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:56.738994"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:19:56.738994"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 1659], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 1658]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.2ms Sent mail to recipient@example.com (4.6ms) Date: Mon, 13 Oct 2014 14:19:56 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd17cb6286_fbaf3fdb35c65bec8327@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:56.760846"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.760846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1432]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1432]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1432]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1432"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:56.765990"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.765990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1433]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1433]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1432/1433"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:56.770971"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.770971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1434]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1432/1433/1434"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:56.775733"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:56.775733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:57.202859"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:57.202859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1660]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1660) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1435) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1432, 1433, 1434, 1435) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1435]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1432/1433/1434/1435' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1432/1433/1434/1435' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1435]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:57.515324"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:57.515324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1661]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1661]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1661]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1661) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.563674"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.563674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1436]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1436]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1436]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1436"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:57.569088"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.569088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1437]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1437]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1437]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1436/1437"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:57.574028"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.574028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1438]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1436/1437/1438"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:57.578984"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.578984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.581619"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:19:57.581619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.583180"], ["group_id", 1437], ["person_id", 1662], ["updated_at", "2014-10-13 13:19:57.583180"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.583866' WHERE "people"."id" = 1662 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.585131' WHERE "groups"."id" = 1437  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.589217"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:19:57.589217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.591123"], ["group_id", 1437], ["person_id", 1663], ["updated_at", "2014-10-13 13:19:57.591123"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.591917' WHERE "people"."id" = 1663 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.592610' WHERE "groups"."id" = 1437  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.595235"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:19:57.595235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.596785"], ["group_id", 1437], ["person_id", 1664], ["updated_at", "2014-10-13 13:19:57.596785"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.597445' WHERE "people"."id" = 1664 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.597996' WHERE "groups"."id" = 1437  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1661]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1437) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1436, 1437) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1437]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1436/1437' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1436/1437' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1436/1437' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1661]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1437) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1436, 1437) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1437 OR "groups"."ancestry" ILIKE '1436/1437/%') OR "groups"."ancestry" = '1436/1437')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1439,1438,1437) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:57.671559"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:57.671559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1665]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1665]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1665) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.2ms | ActiveRecord: 1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.728372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.728372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1440]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1440]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1440]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1440"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:57.736124"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.736124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1441]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1441]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1441]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1440/1441"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:57.743116"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.743116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1442]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1440/1441/1442"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:57.749786"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.749786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1443) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1440, 1441, 1442, 1443) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1443]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1440/1441/1442/1443' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1440/1441/1442/1443' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1443]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.5ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:57.785561"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:57.785561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1666]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1666]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1666]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1666) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.835444"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.835444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1444]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1444]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1444]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1444"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:57.840423"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.840423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1445]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1445]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1445]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1444/1445"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:57.845577"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.845577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1446]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1444/1445/1446"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:57.850663"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.850663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.853654"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:19:57.853654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.855346"], ["group_id", 1447], ["person_id", 1667], ["updated_at", "2014-10-13 13:19:57.855346"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.856062' WHERE "people"."id" = 1667 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.856696' WHERE "groups"."id" = 1447  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.859249"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:19:57.859249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.860779"], ["group_id", 1447], ["person_id", 1668], ["updated_at", "2014-10-13 13:19:57.860779"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.861410' WHERE "people"."id" = 1668 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.862013' WHERE "groups"."id" = 1447  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.864323"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:19:57.864323"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.866177"], ["group_id", 1447], ["person_id", 1669], ["updated_at", "2014-10-13 13:19:57.866177"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.866930' WHERE "people"."id" = 1669 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.868088' WHERE "groups"."id" = 1447  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1666]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1447) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1444, 1445, 1446, 1447) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1447]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1444/1445/1446/1447' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1444/1445/1446/1447' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1447]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:57.913468"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:57.913468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1670]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1670]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1670]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1670) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.963753"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.963753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1448]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1448]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1448]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1448"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:57.969920"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.969920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1449]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1449]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1449]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1448/1449"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:57.977816"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.977816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1450]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1450]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1450]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1448/1449/1450"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:57.983594"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:57.983594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.986461"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:19:57.986461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.988105"], ["group_id", 1449], ["person_id", 1671], ["updated_at", "2014-10-13 13:19:57.988105"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.988803' WHERE "people"."id" = 1671 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.989474' WHERE "groups"."id" = 1449  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:57.991992"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:19:57.991992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:57.993593"], ["group_id", 1449], ["person_id", 1672], ["updated_at", "2014-10-13 13:19:57.993593"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:57.994279' WHERE "people"."id" = 1672 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:57.994888' WHERE "groups"."id" = 1449  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:58.006871"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:19:58.006871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:19:58.008530"], ["group_id", 1449], ["person_id", 1673], ["updated_at", "2014-10-13 13:19:58.008530"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:19:58.009199' WHERE "people"."id" = 1673 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:19:58.009767' WHERE "groups"."id" = 1449  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1670]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1449) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1448, 1449) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1449]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1448/1449' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1448/1449' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1448/1449' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:58.047268"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:58.047268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1674]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1674]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1674) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:58.097535"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.097535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1452]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1452]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1452]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1452"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:58.102824"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.102824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1453]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1452/1453"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:58.107910"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.107910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1454]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1454]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1454]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1452/1453/1454"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:58.113019"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.113019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1452) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1452) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1452]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.9ms | ActiveRecord: 1.8ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1453) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1452, 1453) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1453]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.1ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1454) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1452, 1453, 1454) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1454]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453/1454' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453/1454' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1452/1453/1454' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:58.188840"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.188840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1456]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1456]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1456]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1456"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:58.194323"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.194323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1457]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1457]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1457]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1456/1457"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:58.199532"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.199532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1458]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1458]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1458]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1456/1457/1458"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:58.204623"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:58.204623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (1.1ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:58.667135"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:58.667135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1675]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 13ms (ActiveRecord: 2.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1675]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1675) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 40.1ms | ActiveRecord: 1.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1675]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1675]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1675]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:19:58.940752"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:19:58.940752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1676]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1676]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:19:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1676]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1676) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.7ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:59.000057"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.000057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1460"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:59.005082"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.005082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1461]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1460/1461"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:19:59.009827"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.009827"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1462]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1462]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1462]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1460/1461/1462"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:19:59.014828"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.014828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1460) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1460 [["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.017732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1460"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:19:59.022126"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:19:59.022126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1676]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1464) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1460, 1464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1460/1464' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1460/1464' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 2.0ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1676]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1464) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1460, 1464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1460]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1460) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1460/1464' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.8ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 14:19:59 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1676]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1464) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1460, 1464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1464 OR "groups"."ancestry" ILIKE '1460/1464/%') OR "groups"."ancestry" = '1460/1464')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1464) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0066' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:59.387028"], ["image", "placeholder.png"], ["slug", "surname-0066"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 13:19:59.387028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0067' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:19:59.778681"], ["image", "placeholder.png"], ["slug", "surname-0067"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 13:19:59.778681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.265861"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 13:20:00.265861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.269415"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:00.269415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1679]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.278630"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 13:20:00.278630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.281259"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 13:20:00.281259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"1682"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1681]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1682' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1682]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.290165"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 13:20:00.290165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.296730"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:00.296730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1684"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1683]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1684' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1684]] Redirected to http://test.host/people/doe?cache_bust=1413206400 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.307210"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 13:20:00.307210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.313151"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:00.313151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1686"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1685]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1686' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1686]] Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:00.330756"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:00.330756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1687]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1687]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1687]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1687) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.9ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.384221"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:00.384221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1465]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1465]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1465]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1465"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:00.390196"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:00.390196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:00.392917"], ["slug", "surname-0072"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 13:20:00.392917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:00.394898"], ["group_id", 1466], ["person_id", 1688], ["updated_at", "2014-10-13 13:20:00.394898"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1688]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:00.396340' WHERE "people"."id" = 1688 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:00.397094' WHERE "groups"."id" = 1466  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0072/edit" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0072"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1687]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0072' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1688) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1465, 1466) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1465, 1466) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1688]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.1ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/291?referer=%2Fpeople%2Fsurname-0072%2Fedit" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0072/edit", "id"=>"291"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1687]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 291]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 291]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1688]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:00.453784' WHERE "people"."id" = 1688 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1466]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:00.467198' WHERE "groups"."id" = 1466  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0072/edit Completed 302 Found in 19ms (ActiveRecord: 1.8ms) Started GET "/people/surname-0072/edit" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0072"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1687]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0072' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1688) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1688]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1688]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:00.530500"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:00.530500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1467]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1467]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1467]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1467"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:00.535364"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:00.535364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:00.962231"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:00.962231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1689]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1689) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.7ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (11.0ms) Completed 200 OK in 22ms (Views: 20.2ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:01.324446"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:01.324446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1469]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1469]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1469]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1469"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:01.329538"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:01.329538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:01.752456"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:01.752456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1690]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1690) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:01 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1470", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:02.039352"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 13:20:02.039352"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:02.040416"], ["group_id", 1470], ["leader", "t"], ["person_id", 1691], ["role", "Head Honcho"], ["updated_at", "2014-10-13 13:20:02.040416"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1691]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:02.041947' WHERE "people"."id" = 1691 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1470]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:02.043528' WHERE "groups"."id" = 1470  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/taylor Completed 302 Found in 13ms (ActiveRecord: 2.4ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1690]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1691) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1469, 1470) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1469, 1470) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1691]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:02.136288"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:02.136288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1471"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:02.142410"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:02.142410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:02.145049"], ["slug", "surname-0073"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 13:20:02.145049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:02.147003"], ["group_id", 1472], ["person_id", 1692], ["updated_at", "2014-10-13 13:20:02.147003"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1692]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:02.148430' WHERE "people"."id" = 1692 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:02.149121' WHERE "groups"."id" = 1472  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 1471) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1471 [["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:02.152124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1471]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1471"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:02.156811"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:02.156811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:02.581616"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:02.581616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1693]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1693) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0073/edit" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0073"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1692) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1472) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1472) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1692]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.7ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership?id=surname-0073" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0073"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1692) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Completed 200 OK in 12ms (Views: 6.2ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:02 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0073" for 127.0.0.1 at 2014-10-13 14:20:03 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0073", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1472", "leader"=>"0", "id"=>"293"}, "70210779658840"=>{"role"=>"Talker", "group_id"=>"1473", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0073"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1692) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1692]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1692 AND "memberships"."id" != 293 AND "memberships"."group_id" = 1472) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1472 AND "memberships"."id" != 293 AND "memberships"."person_id" = 1692) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0073' AND "people"."given_name" = '' AND ("people"."id" != 1692) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1692 AND "memberships"."id" != 293 AND "memberships"."group_id" = 1472) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1472 AND "memberships"."id" != 293 AND "memberships"."person_id" = 1692) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1692 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:03.874753"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 293 [["role", ""], ["updated_at", "2014-10-13 13:20:03.875928"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:03.876707' WHERE "people"."id" = 1692 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:03.877297' WHERE "groups"."id" = 1472 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:03.877974"], ["group_id", 1473], ["person_id", 1692], ["role", "Talker"], ["updated_at", "2014-10-13 13:20:03.877974"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1692]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:03.879465' WHERE "people"."id" = 1692 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1473]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:03.880709' WHERE "groups"."id" = 1473  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/surname-0073 Completed 302 Found in 22ms (ActiveRecord: 4.3ms) Started GET "/people/surname-0073" for 127.0.0.1 at 2014-10-13 14:20:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0073"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1693]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1692) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1473) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1472) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1473) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1471, 1472) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 23.0ms | ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1692]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:03.989323"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:03.989323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1474]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1474]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1474]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1474"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:03.995305"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:03.995305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:03.998013"], ["slug", "surname-0074"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 13:20:03.998013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:03.999874"], ["group_id", 1475], ["person_id", 1694], ["updated_at", "2014-10-13 13:20:03.999874"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1694]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:04.001275' WHERE "people"."id" = 1694 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:04.001967' WHERE "groups"."id" = 1475  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:04.427819"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:04.427819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1695]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1695) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0074/edit" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0074"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0074' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1694) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1474, 1475) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1474, 1475) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1694]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.9ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0074" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0074", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1475", "leader"=>"0", "id"=>"295"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0074"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0074' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1694) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1694]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1694 AND "memberships"."id" != 295 AND "memberships"."group_id" = 1475) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1475 AND "memberships"."id" != 295 AND "memberships"."person_id" = 1694) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0074' AND "people"."given_name" = '' AND ("people"."id" != 1694) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1694 AND "memberships"."id" != 295 AND "memberships"."group_id" = 1475) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1475 AND "memberships"."id" != 295 AND "memberships"."person_id" = 1694) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1694 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:04.707463"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 295 [["role", "Head Honcho"], ["updated_at", "2014-10-13 13:20:04.708554"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:04.709272' WHERE "people"."id" = 1694 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:04.709833' WHERE "groups"."id" = 1475  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/surname-0074 Completed 302 Found in 20ms (ActiveRecord: 3.9ms) Started GET "/people/surname-0074" for 127.0.0.1 at 2014-10-13 14:20:04 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0074"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1695]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0074' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1694) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1474, 1475) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1474, 1475) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1694]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.797988"], ["slug", "surname-0075"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 13:20:04.797988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0076' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.801473"], ["slug", "surname-0076"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 13:20:04.801473"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.805438"], ["slug", "surname-0077"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 13:20:04.805438"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 1698 [["updated_at", "2014-10-13 13:20:04.806738"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.817613"], ["slug", "surname-0078"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 13:20:04.817613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.824645"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.824645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1476]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1476]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1476]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1476"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:04.829382"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 13:20:04.829382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.831609"], ["group_id", 1477], ["person_id", 1699], ["updated_at", "2014-10-13 13:20:04.831609"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1699]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:04.833154' WHERE "people"."id" = 1699 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:04.833842' WHERE "groups"."id" = 1477  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1699]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.838603"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 13:20:04.838603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1700]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.843484"], ["slug", "surname-0080"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 13:20:04.843484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.847154"], ["slug", "surname-0081"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 13:20:04.847154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.854468"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.854468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1478) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1478 [["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.857377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1478) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1478 [["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.860379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1478) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1478 [["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.863252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1478) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1478 [["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.868843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.876737"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.876737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1479) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1479 [["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.880412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1479) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1479 [["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.884026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1479) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1479 [["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.887271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.898443"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.898443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1480) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1480 [["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.901776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1480) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1480 [["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.906228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1480) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1480 [["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.909209"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.924138"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.924138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1481) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1481 [["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.940040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:04.945715"], ["slug", "surname-0082"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 13:20:04.945715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.952016"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.952016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1482"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:04.956543"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.956543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1482) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1482 [["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.959520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1482]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1482"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:04.963984"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.963984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.965894"], ["group_id", 1484], ["person_id", 1703], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:04.965894"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1703]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:04.967508' WHERE "people"."id" = 1703 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:04.968146' WHERE "groups"."id" = 1484  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.969397"], ["group_id", 1483], ["person_id", 1703], ["role", "Designer"], ["updated_at", "2014-10-13 13:20:04.969397"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1703]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:04.970589' WHERE "people"."id" = 1703 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:04.971154' WHERE "groups"."id" = 1483  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1703]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.978963"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 13:20:04.978963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1704]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.982835"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:04.982835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1705]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:04.998259"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:04.998259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:05.011317"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:05.011317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:05.019993"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:05.019993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:05.035019"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:05.035019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:05.047126"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:05.047126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:05.057630"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:05.057630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:05.073340"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:20:05.073340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.088236"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.088236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1711]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1711) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:05.133616"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 13:20:05.133616"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1712) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.1ms | ActiveRecord: 1.2ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1712) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 8.8ms Sent mail to bob.smith@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:20:05 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd18531174_fbaf3fdb35c65bec8339b@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1712]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 26ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1711]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.234228"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.234228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1713]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1713) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (12.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (13.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.290977"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:05.290977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1714) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.7ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1714) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1714) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1714) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1714 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:05.366060"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:05.373346"], ["updated_at", "2014-10-13 13:20:05.373346"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "2a426849-ceba-41f9-a848-13901eee8b69"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 12.0ms Sent mail to bob.smith@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:20:05 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd1855d901_fbaf3fdb35c65bec83436@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/2a426849-ceba-41f9-a848-13901eee8b69?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 31ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1714) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.415748"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.415748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1715]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1715) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:05.461541"], ["email", "test.user"], ["slug", "test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 13:20:05.461541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2/edit" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1716) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f756424c-3f29-4732-8aa1-ba629cf27fc2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1716) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1716]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1715]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.538190"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.538190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1717]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1717]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1717]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1717) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1717]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.4ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1717]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:05.646818"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-90b5b8a6-8d3b-45fb-9a54-b635f40f8d2f"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:05.646818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-90b5b8a6-8d3b-45fb-9a54-b635f40f8d2f Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-90b5b8a6-8d3b-45fb-9a54-b635f40f8d2f" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-90b5b8a6-8d3b-45fb-9a54-b635f40f8d2f"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1717]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-90b5b8a6-8d3b-45fb-9a54-b635f40f8d2f' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1718) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.674340"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.674340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1719]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1719) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:05.720706"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-ea555a40-c825-4588-bf36-9639ed069c31"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 13:20:05.720706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-ea555a40-c825-4588-bf36-9639ed069c31/edit" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-ea555a40-c825-4588-bf36-9639ed069c31"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ea555a40-c825-4588-bf36-9639ed069c31' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1720) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-ea555a40-c825-4588-bf36-9639ed069c31" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-ea555a40-c825-4588-bf36-9639ed069c31"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ea555a40-c825-4588-bf36-9639ed069c31' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1720) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1720]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1719]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.799504"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.799504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1721]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1721) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:05.854895"], ["slug", "surname-0089"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 13:20:05.854895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0089/edit" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1722) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0089" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0089"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1722) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1722]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1721]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.934849"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:05.934849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1723]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1723) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:05.981784"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:05.981784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1724) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1724) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1724) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1724) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1724 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:20:06.057336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:06.064285"], ["updated_at", "2014-10-13 13:20:06.064285"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "739ad2db-aae7-42c2-8d47-988aed02307b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 14.3ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:20:06 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd18612705_fbaf3fdb35c65bec8358b@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/739ad2db-aae7-42c2-8d47-988aed02307b?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 32ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1723]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1724) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.107067"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.107067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1725]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1725) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 45.3ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:06.165889"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:06.165889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1726) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1726) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 42ms (Views: 36.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1726) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1726) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 1726 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:20:06.245866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 2.2ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1725]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1726) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.276273"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.276273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1727]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1727]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1727]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1727) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1727]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.3ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1727]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:06.371848"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-c21df84b-11a9-4e35-9ff8-5133d823de0e"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:06.371848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-c21df84b-11a9-4e35-9ff8-5133d823de0e Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-c21df84b-11a9-4e35-9ff8-5133d823de0e" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-c21df84b-11a9-4e35-9ff8-5133d823de0e"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1727]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c21df84b-11a9-4e35-9ff8-5133d823de0e' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1728) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.400633"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.400633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1729]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1729) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.8ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.455557"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:06.455557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1730) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf/edit" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1730) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1730) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1730) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1730 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:20:06.530373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1729]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-21a0edbf-e0b4-4f13-a50c-80973330fbbf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1730) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.558827"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.558827"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1731]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1731) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.604285"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-4b942025-cccb-46b8-9238-a8672db56392"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:06.604285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-4b942025-cccb-46b8-9238-a8672db56392" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-4b942025-cccb-46b8-9238-a8672db56392"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4b942025-cccb-46b8-9238-a8672db56392' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1732) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-4b942025-cccb-46b8-9238-a8672db56392/edit" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-4b942025-cccb-46b8-9238-a8672db56392"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4b942025-cccb-46b8-9238-a8672db56392' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1732) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started PATCH "/people/test-user-4b942025-cccb-46b8-9238-a8672db56392" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-4b942025-cccb-46b8-9238-a8672db56392"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4b942025-cccb-46b8-9238-a8672db56392' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1732) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1732) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1732 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:20:06.679162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-4b942025-cccb-46b8-9238-a8672db56392 Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-4b942025-cccb-46b8-9238-a8672db56392" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-4b942025-cccb-46b8-9238-a8672db56392"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1731]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4b942025-cccb-46b8-9238-a8672db56392' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1732) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.718196"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.718196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1733]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1733]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 18ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1733]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1733) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1733]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.0ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1733]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:06.816085"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-0a528a6c-8767-4c25-ac83-67142723bc27"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:06.816085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-0a528a6c-8767-4c25-ac83-67142723bc27 Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-0a528a6c-8767-4c25-ac83-67142723bc27" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-0a528a6c-8767-4c25-ac83-67142723bc27"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1733]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0a528a6c-8767-4c25-ac83-67142723bc27' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1734) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.844103"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.844103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1735]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1735]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1735]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1735) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.5ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:06.889639"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:20:06.889639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:06.893159"], ["updated_at", "2014-10-13 13:20:06.893159"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "6235c85b-1b88-4327-9833-bcc63cf75f55"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/6235c85b-1b88-4327-9833-bcc63cf75f55?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"6235c85b-1b88-4327-9833-bcc63cf75f55"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '6235c85b-1b88-4327-9833-bcc63cf75f55' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1736]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1736) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:06.925049"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:06.925049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1737]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1737]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1737]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1737) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1737]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 40.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1737]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:07.034527"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.034527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1737]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1738) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.061001"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.061001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1739]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1739) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.110924"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.110924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1740) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5/edit" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1740) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1740) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1740) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1740 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:07.186886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:07.192829"], ["updated_at", "2014-10-13 13:20:07.192829"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "fcdc7de2-7bcc-49d9-af70-71510ecc3a8d"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 12.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:20:07 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd18731834_fbaf3fdb35c65bec8363e@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/fcdc7de2-7bcc-49d9-af70-71510ecc3a8d?desired_path=%2Fpeople%2Ftest-user-71563885-ed04-4c1c-a062-e31e70b3d9e5. Redirected to http://www.example.com/people/test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5 Completed 302 Found in 33ms (ActiveRecord: 2.2ms) Started GET "/people/test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1739]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-71563885-ed04-4c1c-a062-e31e70b3d9e5' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1740) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.238484"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.238484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1741]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1741) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.299399"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.299399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1742) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1742) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1742) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1742) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1742 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:20:07.373716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1741]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1742) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.402185"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.402185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1743]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1743) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.446700"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.446700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1744) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1744) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1744) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1744) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1744 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:07.523494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1743]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1744) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.560529"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.560529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1745]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1745]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 16ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1745]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1745) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.0ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1745]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 30.8ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1745]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:07.662489"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.662489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:07.668464"], ["updated_at", "2014-10-13 13:20:07.668464"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "c8fa7bc7-7419-402e-90ec-9ac236851174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 11.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:20:07 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd187a578f_fbaf3fdb35c65bec83776@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/c8fa7bc7-7419-402e-90ec-9ac236851174?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 27ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1745]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1746) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.710771"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.710771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1747]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1747) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:07.756104"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 13:20:07.756104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55/edit" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1748) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-eca41d5a-235b-4c58-972f-5d2e057a2d55' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1748) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1748]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1747]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (18.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.848959"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:07.848959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1749]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1749) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.6ms | ActiveRecord: 1.0ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:07.896628"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:20:07.896628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1750) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1750) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:07 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1750) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1750) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1750 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:07.975835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:07.981641"], ["updated_at", "2014-10-13 13:20:07.981641"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "753b3fa6-c5e7-4de1-a7a6-2e1c1dff02a7"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 8.6ms Sent mail to bob.smithe@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:20:07 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bd187f13db_fbaf3fdb35c65bec838aa@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/753b3fa6-c5e7-4de1-a7a6-2e1c1dff02a7?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:07.996828"], ["updated_at", "2014-10-13 13:20:07.996828"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "bac37aea-abb3-4df2-8838-668445d51a3f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 8.4ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:20:08 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd188c69_fbaf3fdb35c65bec83938@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/bac37aea-abb3-4df2-8838-668445d51a3f?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 41ms (ActiveRecord: 2.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:20:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1749]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1750) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:08.035064"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:08.035064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1487]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1487]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1487]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1487"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:08.040023"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:08.040023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1488]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1488]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1488]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1487/1488"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:20:08.045129"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:08.045129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:08.067398"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:20:08.067398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:08.070455"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:20:08.070455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:08.077837"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:08.077837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1490]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1490]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1490]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1490"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:08.082859"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:08.082859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:08.085005"], ["group_id", 1491], ["person_id", 1752], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:08.085005"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1752]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:08.086668' WHERE "people"."id" = 1752 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:08.087398' WHERE "groups"."id" = 1491  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1751]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1752]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:09.116176"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:20:09.116176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:09.118841"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:20:09.118841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:09.125275"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:09.125275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1492]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1492]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1492]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1492"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:09.144169"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:09.144169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:09.146339"], ["group_id", 1493], ["person_id", 1754], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:09.146339"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1754]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:09.147880' WHERE "people"."id" = 1754 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:09.148700' WHERE "groups"."id" = 1493  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1753]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1754]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1754, 1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1754, 1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1754, 1752) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:10.170882"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:20:10.170882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:10.173525"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:20:10.173525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:10.179806"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:10.179806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1494]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1494]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1494]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1494"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:10.184347"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:10.184347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:10.186219"], ["group_id", 1495], ["person_id", 1756], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:10.186219"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1756]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:10.187623' WHERE "people"."id" = 1756 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:10.188266' WHERE "groups"."id" = 1495  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1755]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1756]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1751, 1755, 1753) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1751, 1755, 1753) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1751, 1755, 1753) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:11.210435"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:20:11.210435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:11.213051"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:20:11.213051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:11.219580"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:11.219580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1496]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1496]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1496]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1496"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:11.224182"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:11.224182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:11.226154"], ["group_id", 1497], ["person_id", 1758], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:11.226154"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1758]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:11.227558' WHERE "people"."id" = 1758 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:11.228234' WHERE "groups"."id" = 1497  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1757]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1758]] Peoplefinder::Person Load (1.0ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1756, 1752, 1758, 1754) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1756, 1752, 1758, 1754) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1756, 1752, 1758, 1754) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:12.251001"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:20:12.251001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:12.253683"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:20:12.253683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:12.260342"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:12.260342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1498]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1498"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:12.265155"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:12.265155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:12.267225"], ["group_id", 1499], ["person_id", 1760], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:20:12.267225"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1760]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:12.268881' WHERE "people"."id" = 1760 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:12.269606' WHERE "groups"."id" = 1499  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1759]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1760]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1753, 1751, 1759, 1757, 1755) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1753, 1751, 1759, 1757, 1755) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1753, 1751, 1759, 1757, 1755) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK SQL (0.4ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:13.340997"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:13.340997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:20:13.343619"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:20:13.343619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1761]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:14.361993"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:14.361993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1762]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1762]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1762]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1762) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1762]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1762]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1761) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1761]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 0.9ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.505485"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 13:20:14.505485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1763]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.514410"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 13:20:14.514410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1764]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.522061"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 13:20:14.522061"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.529535"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.529535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1501]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1501]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1501]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0071-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1501"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.534603"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.534603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0071"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1765]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0071' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1502) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1501]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1501]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1501/1502/%' OR "groups"."ancestry" = '1501/1502')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1501/1502' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1502]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 10ms (ActiveRecord: 2.5ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.551214"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 13:20:14.551214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.554391"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.554391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1503]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1503]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1503]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1503"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.559378"], ["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.559378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0073"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1766]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0073' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1504) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1503]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1503]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1503/1504/%' OR "groups"."ancestry" = '1503/1504')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1503/1504' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1504]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0072 Completed 302 Found in 9ms (ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.574155"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 13:20:14.574155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.582129"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.582129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1505]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1505]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1505]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1505"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.600214"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.600214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0074", "team_email_address"=>"example.user.260@digital.justice.gov.uk"}, "id"=>"group-0074"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1767]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0074' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1506) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0074' AND "groups"."id" != 1506) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0074 Completed 302 Found in 7ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.613272"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 13:20:14.613272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.622837"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.622837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1507"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.627330"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.627330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0076", "team_email_address"=>"example.user.264@digital.justice.gov.uk"}, "id"=>"group-0075"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1768]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0075' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1508) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1507]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1508) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0076' AND "groups"."id" != 1508) LIMIT 1 SQL (0.5ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 1508 [["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.639312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0076 Completed 302 Found in 11ms (ActiveRecord: 2.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1508]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.647173"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 13:20:14.647173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.654630"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.654630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1509]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0077-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1509"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.659197"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.659197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0077", "team_email_address"=>"example.user.265@digital.justice.gov.uk"}, "id"=>"group-0077"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1769]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0077' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1510) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0077' AND "groups"."id" != 1510) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0077 Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.672215"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 13:20:14.672215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.679893"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.679893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1511"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.684815"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.684815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0078"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1770]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0078' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1512) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1511]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1512) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1512) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.700727"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 13:20:14.700727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.710559"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.710559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1513"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.716658"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.716658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0079"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1771]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0079' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1514) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1513]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1514) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1514) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.732862"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 13:20:14.732862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.739928"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.739928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1515"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.744459"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.744459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0080"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1772]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0080' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1516) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1515]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1516) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1516) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.760601"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 13:20:14.760601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0081", "team_email_address"=>"example.user.273@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1773]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.767725"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.767725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0081 Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.773605"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 13:20:14.773605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0082", "team_email_address"=>"example.user.274@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1774]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.780954"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.780954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0082 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.786282"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 13:20:14.786282"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0083", "team_email_address"=>"example.user.275@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1775]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.791917"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.791917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0083 Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.797675"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 13:20:14.797675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1776]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.808173"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 13:20:14.808173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1777]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.818908"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 13:20:14.818908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1778]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.833141"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 13:20:14.833141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.840644"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.840644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1520]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1520]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1520"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.844887"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.844887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0084"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1779]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0084' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1521) ORDER BY people.surname Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.859425"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 13:20:14.859425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.865651"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.865651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1522]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1522]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1522]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1522"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.872864"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.872864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1780]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 3ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.881560"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 13:20:14.881560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1781]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.888758"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 13:20:14.888758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.894772"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.894772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1782]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.902174"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 13:20:14.902174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.909427"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.909427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1525]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1525]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1525"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:14.914918"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:14.914918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0086"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1783]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0086' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1526) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.925906"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 13:20:14.925906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1784]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.934656"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 13:20:14.934656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1785]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:14.942046"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 13:20:14.942046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1786]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:14.993846"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:14.993846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1787]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1787]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1787) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.1ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1787]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1787) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1787]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1787) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1787]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.107349"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.107349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:15.115380"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:15.115380"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1788]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1788]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1788]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1788) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1788]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.178158"], ["updated_at", "2014-10-13 13:20:15.178158"], ["user_email", "example.user.284@digital.justice.gov.uk"], ["value", "9df54998-47c8-4430-abe3-ca99a0fde845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.186623"], ["updated_at", "2014-10-13 13:20:15.186623"], ["user_email", "example.user.286@digital.justice.gov.uk"], ["value", "d57ddb7f-a43d-4222-9e03-8f1b8401a471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 118]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.194325"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 13:20:15.194325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.197955"], ["updated_at", "2014-10-13 13:20:15.197955"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "de48601a-4de3-4931-b040-8fcbdc11f997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.217593"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 13:20:15.217593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1790]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.244732"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.244732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1528]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1528]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1528]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1528"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.250793"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.250793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.256352"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 13:20:15.256352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1791]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.264075"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 13:20:15.264075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1792]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.271411"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 13:20:15.271411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0120' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.274694"], ["slug", "surname-0120"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 13:20:15.274694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0120"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1793]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0120' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1794) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1794]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.285443"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 13:20:15.285443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0122' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.289781"], ["slug", "surname-0122"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 13:20:15.289781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0122"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1795]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0122' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1796) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1796]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.303783"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 13:20:15.303783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0124' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.307103"], ["slug", "surname-0124"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 13:20:15.307103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1797]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1798) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1798]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.317549"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 13:20:15.317549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0126' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.320746"], ["slug", "surname-0126"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 13:20:15.320746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0126"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1799]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0126' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1800) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.334393"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.334393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1530]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1530]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1530]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1530"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.339712"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.339712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.344713"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 13:20:15.344713"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.348720"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 13:20:15.348720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0128"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1801]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0128' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1802) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.360042"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 13:20:15.360042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0130' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.363373"], ["slug", "surname-0130"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 13:20:15.363373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0130"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1803]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0130' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1804) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.374382"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 13:20:15.374382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0132' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.378629"], ["slug", "surname-0132"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 13:20:15.378629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0132"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1805]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0132' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1806) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.391460"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 13:20:15.391460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0134' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.395117"], ["slug", "surname-0134"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 13:20:15.395117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0135", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0134"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1807]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1808) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0135' AND "people"."given_name" IS NULL AND ("people"."id" != 1808) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1808 [["surname", "Surname-0135"], ["updated_at", "2014-10-13 13:20:15.404343"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0134 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.410166"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 13:20:15.410166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0137' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.413453"], ["slug", "surname-0137"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 13:20:15.413453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0138", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0137"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1809]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0137' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1810) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0138' AND "people"."given_name" IS NULL AND ("people"."id" != 1810) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1810 [["surname", "Surname-0138"], ["updated_at", "2014-10-13 13:20:15.422180"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0137 Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1810]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.428698"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 13:20:15.428698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0140' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.432116"], ["slug", "surname-0140"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 13:20:15.432116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0141", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0140"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1811]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0140' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1812) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0141' AND "people"."given_name" IS NULL AND ("people"."id" != 1812) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 1812 [["surname", "Surname-0141"], ["updated_at", "2014-10-13 13:20:15.446704"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0140 Completed 302 Found in 14ms (ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.452951"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 13:20:15.452951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0143' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.456132"], ["slug", "surname-0143"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 13:20:15.456132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0144", "image"=>"#"}, "id"=>"surname-0143"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1813]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0143' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1814) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0144' AND "people"."given_name" IS NULL AND ("people"."id" != 1814) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1814]] SQL (0.2ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 1814 [["image", nil], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 13:20:15.465207"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0143/image/edit Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.471174"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 13:20:15.471174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.473656"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:20:15.473656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.475995"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:20:15.475995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1815]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1817) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 1817) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.488772"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 13:20:15.488772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1818]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.500158"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.500158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1532]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1532]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1532]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1532"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.505089"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.505089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.510346"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 13:20:15.510346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1819]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.519487"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 13:20:15.519487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1820]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.528025"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 13:20:15.528025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1821]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.538374"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 13:20:15.538374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0151"}} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1822]] Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0151' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0151' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.547823"], ["slug", "surname-0151"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 13:20:15.547823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0151 Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.554798"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 13:20:15.554798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0153"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1824]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0153' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0153' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.562155"], ["slug", "surname-0153"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 13:20:15.562155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0153 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.570168"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 13:20:15.570168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0155"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1826]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0155' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0155' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.577024"], ["slug", "surname-0155"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 13:20:15.577024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0155 Completed 302 Found in 6ms (ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.582613"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 13:20:15.582613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0157", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1828]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0157' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0157' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.589416"], ["image", nil], ["slug", "surname-0157"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 13:20:15.589416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0157/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.610335"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 13:20:15.610335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.613523"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:20:15.613523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1830]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.625458"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 13:20:15.625458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0160' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.629478"], ["slug", "surname-0160"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 13:20:15.629478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0160"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1832]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0160' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1833) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.640027"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 13:20:15.640027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0162' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.643169"], ["slug", "surname-0162"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 13:20:15.643169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0162"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1834]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0162' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1835) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.656303"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.656303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1534]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1534]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1534]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1534"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.660987"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.660987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.665730"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 13:20:15.665730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0164' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.668959"], ["slug", "surname-0164"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 13:20:15.668959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1836]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1837) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.679724"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 13:20:15.679724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0166' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.683016"], ["slug", "surname-0166"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 13:20:15.683016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.689445"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.689445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1536]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1536]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1536]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1536"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.694145"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.694145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.695722"], ["group_id", 1537], ["person_id", 1839], ["updated_at", "2014-10-13 13:20:15.695722"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1839]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:15.697152' WHERE "people"."id" = 1839 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:15.697840' WHERE "groups"."id" = 1537  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0166"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1838]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0166' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1839) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.708502"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 13:20:15.708502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1840]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.714804"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 13:20:15.714804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0169' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.718127"], ["slug", "surname-0169"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 13:20:15.718127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0169"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1841]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0169' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1842) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.728558"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 13:20:15.728558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1843]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.735605"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 13:20:15.735605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1844]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.744619"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.744619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1538]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1538]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1538]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1538"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.749576"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.749576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.754210"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 13:20:15.754210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0173' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.756786"], ["slug", "surname-0173"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 13:20:15.756786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0173"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1845]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0173' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1846) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.766902"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 13:20:15.766902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0175' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.769350"], ["slug", "surname-0175"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 13:20:15.769350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0175"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1847]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0175' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1848) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:15.781515"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.781515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1540]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1540]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1540]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1540"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:15.786100"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:15.786100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:15.795836"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:15.795836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1849]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1849) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0176' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.841146"], ["slug", "surname-0176"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 13:20:15.841146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0176/edit" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0176"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1850) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.7ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0176" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0176"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1850) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1850]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1849]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (13.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (13.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 24.4ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1850]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:15.930828"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:15.930828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1851]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1851]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1851]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1851) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0177' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:15.975660"], ["slug", "surname-0177"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 13:20:15.975660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0177/edit" for 127.0.0.1 at 2014-10-13 14:20:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0177"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1851]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0177' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1852) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 39ms (Views: 34.6ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:16.032493"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:16.032493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1542]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1542]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1542]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1542"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:16.037063"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:16.037063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:16.040201"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:16.040201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:16.472157"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:16.472157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1854]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1854) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 35ms (Views: 32.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1543", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1853]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 16.1ms | ActiveRecord: 1.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1543"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413206416-64431-0799/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:20:16.888742"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:16.888742"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:16.890130"], ["group_id", 1543], ["person_id", 1855], ["role", ""], ["updated_at", "2014-10-13 13:20:16.890130"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1855]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:16.891823' WHERE "people"."id" = 1855 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1543]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:16.893787' WHERE "groups"."id" = 1543  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa/image/edit Completed 302 Found in 17ms (ActiveRecord: 2.2ms) Started GET "/people/marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa/image/edit" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 6.8ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Started PUT "/people/marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa/image" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64433/people/marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa?cache_bust=1413206416 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa?cache_bust=1413206416" for 127.0.0.1 at 2014-10-13 14:20:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206416", "id"=>"marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-97db3aa1-b2fd-485e-8615-48597a5a67aa' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1855) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1542, 1543) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1542, 1543) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 1.7ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.102787"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.102787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1856]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1856) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:17.153309"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:17.153309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1857) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1857) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1857) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 1857) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 1857 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.231626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 28ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1856]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1857) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.277620"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.277620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1858]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1858) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 31.0ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:20:17.373352"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:17.373352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1859) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1858]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1859) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.450028"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.450028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1860]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1860) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 42.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:17.509825"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:17.509825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1544]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1544]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1544]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1544"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:17.514545"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:17.514545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0178' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:17.517530"], ["slug", "surname-0178"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 13:20:17.517530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:17.520004"], ["group_id", 1545], ["person_id", 1861], ["updated_at", "2014-10-13 13:20:17.520004"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1861]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:17.521411' WHERE "people"."id" = 1861 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:17.522093' WHERE "groups"."id" = 1545  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0178" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0178"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0178' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1861) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1544, 1545) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1544, 1545) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.2ms | ActiveRecord: 1.3ms) Started GET "/people/surname-0178/reported_profiles/new" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0178"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0178' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.6ms) Started POST "/people/surname-0178/reported_profiles" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0178"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0178' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1861]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 1860], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.303@digital.justice.gov.uk"], ["subject_id", 1861]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.5ms Sent mail to example.user.303@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:20:17 +0100 From: support@example.com To: example.user.303@digital.justice.gov.uk Message-ID: <543bd1918c26c_fbaf3fdb35c65bec84016@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0178 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0178 Redirected to http://www.example.com/people/surname-0178 Completed 302 Found in 17ms (ActiveRecord: 1.3ms) Started GET "/people/surname-0178" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0178"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0178' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1861) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1544, 1545) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1544, 1545) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.607333"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.607333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1862]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1862) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.6ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:17.707911"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:17.707911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 12ms (ActiveRecord: 1.2ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.6ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1863) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 22.7ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1862]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1863) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.6ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.803482"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.803482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1864]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1864]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1864]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1864) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:20:17.851281"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:17.851281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1865) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1865) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1864]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1865) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 28.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:17.967956"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:17.967956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1866]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1866) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 32.9ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:18.026062"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:18.026062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 33.4ms | ActiveRecord: 0.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1867]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1866]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:18.120951"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:18.120951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1868]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1868]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1868]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1868) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1868]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 36.6ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:18.217315"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:18.217315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1869]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1869) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 32.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:18.275293"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:18.275293"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:18.280538"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:20:18.280538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1871) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1871) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 1871) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1870]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 9.8ms | ActiveRecord: 1.6ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1871) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1871 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:18.361766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1869]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1871) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:18.392239"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:18.392239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1546]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1546]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1546]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1546"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:18.397132"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:18.397132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0179' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:18.399924"], ["slug", "surname-0179"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 13:20:18.399924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:18.822106"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:18.822106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1873]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1873) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0179/edit" for 127.0.0.1 at 2014-10-13 14:20:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0179"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0179' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1872) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0179" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0179", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1546", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0179"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0179' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1872) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0179' AND "people"."given_name" = '' AND ("people"."id" != 1872) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 1872 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:20:19.148884"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:19.150295"], ["group_id", 1546], ["person_id", 1872], ["role", ""], ["updated_at", "2014-10-13 13:20:19.150295"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1872]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:19.151873' WHERE "people"."id" = 1872 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1546]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:19.153266' WHERE "groups"."id" = 1546  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/surname-0179 Completed 302 Found in 16ms (ActiveRecord: 3.0ms) Started GET "/people/surname-0179" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0179"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0179' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1872) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1546) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1546) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0179/edit" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0179"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0179' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1872) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1546) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1546) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1872]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 38.3ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:19.365824"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:19.365824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1548]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1548]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1548]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1548"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:19.370478"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:19.370478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64433/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:19.801040"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:19.801040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1874]] Redirected to http://127.0.0.1:64433/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1874) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:19 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (13.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 40.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1549", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:20:20.135219"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:20.135219"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.136414"], ["group_id", 1549], ["person_id", 1875], ["role", ""], ["updated_at", "2014-10-13 13:20:20.136414"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1875]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:20.137832' WHERE "people"."id" = 1875 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1549]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:20.139268' WHERE "groups"."id" = 1549  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64433/people/marco-polo/image/edit Completed 302 Found in 18ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.5ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64433/people/marco-polo?cache_bust=1413206420 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413206420" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206420", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1875) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1548, 1549) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1548, 1549) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.6ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.343810"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.343810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1876]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1876]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1876]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1876) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0180' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:20.390194"], ["slug", "surname-0180"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 13:20:20.390194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.397045"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.397045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1550]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1550]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1550]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1550"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:20.401929"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.401929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:20.404440"], ["group_id", 1551], ["person_id", 1877], ["updated_at", "2014-10-13 13:20:20.404440"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:20.405743' WHERE "people"."id" = 1877 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:20.406600' WHERE "groups"."id" = 1551  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0180/edit" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0180"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1876]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1877) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1550, 1551) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1550, 1551) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1877]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (9.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.1ms | ActiveRecord: 1.7ms) Started DELETE "/people/surname-0180" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0180"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1876]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1877) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 309]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1877]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:20.471556' WHERE "people"."id" = 1877 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:20.472306' WHERE "groups"."id" = 1551 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1877]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1876]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1877]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.492603"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.492603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1878]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1878]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1878]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1878) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.4ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1878]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1878]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 25.5ms | ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.625455"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.625455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1879]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1879]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1879]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1879) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.670711"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-4125c1d8-70a2-4052-a9ac-9245a8caaf8b"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 13:20:20.670711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1880]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1880 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:20.675810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.685786"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.685786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1552]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1552]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1552]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1552"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:20.690231"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.690231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:20.692154"], ["group_id", 1553], ["person_id", 1880], ["updated_at", "2014-10-13 13:20:20.692154"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1880]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:20.693512' WHERE "people"."id" = 1880 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:20.694166' WHERE "groups"."id" = 1553  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-4125c1d8-70a2-4052-a9ac-9245a8caaf8b" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-4125c1d8-70a2-4052-a9ac-9245a8caaf8b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1879]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-4125c1d8-70a2-4052-a9ac-9245a8caaf8b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1880) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1552, 1553) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1552, 1553) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.721434"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.721434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1881]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1881]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1881]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1881) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.763856"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-b9c8bdc3-0de8-403d-ae87-0223c265c7fd"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 13:20:20.763856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-b9c8bdc3-0de8-403d-ae87-0223c265c7fd" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-b9c8bdc3-0de8-403d-ae87-0223c265c7fd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1881]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-b9c8bdc3-0de8-403d-ae87-0223c265c7fd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1882) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.789404"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.789404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1883]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1883) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 34.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.835711"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 13:20:20.835711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1884) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.7ms | ActiveRecord: 1.0ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.2ms | ActiveRecord: 0.6ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 1884], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:20.877202"], ["updated_at", "2014-10-13 13:20:20.877202"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "ae5f0141-b12a-4b26-9bb5-910487327905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 8.1ms Sent mail to someone.else@digital.justice.gov.uk (4.7ms) Date: Mon, 13 Oct 2014 14:20:20 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd194d7a7e_fbaf3fdb35c65bec84134@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/ae5f0141-b12a-4b26-9bb5-910487327905?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 17ms (ActiveRecord: 1.3ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1883]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1884) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:20.916659"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:20.916659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1885]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1885]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1885) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.962909"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 13:20:20.962909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1886]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1886 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:20:20.967544"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:20.978733"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.978733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1554]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1554]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1554]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1554"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:20:20.983143"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:20:20.983143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:20:20.985168"], ["group_id", 1555], ["person_id", 1886], ["updated_at", "2014-10-13 13:20:20.985168"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1886]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:20:20.986524' WHERE "people"."id" = 1886 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:20:20.987187' WHERE "groups"."id" = 1555  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:20:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1885]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1886) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1554, 1555) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1554, 1555) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:20:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:20:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:20:21.014747"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:20:21.014747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1887]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1887]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:20:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1887]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1887) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.5ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:20:21.057886"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 13:20:21.057886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 1888 [["email", nil], ["updated_at", "2014-10-13 13:20:21.059167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:20:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1887]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1888) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (1.2ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:52.715314"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:52.715314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1889]] Peoplefinder::Group Load (1.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1889]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 107ms (ActiveRecord: 5.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1889]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1889) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (11.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (64.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (76.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (70.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (30.4ms) Completed 200 OK in 208ms (Views: 189.6ms | ActiveRecord: 3.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:52.960213"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:52.960213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1556]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1556]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1556]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1556"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:52.967367"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:52.967367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:52.970303"], ["slug", "surname-0001"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 13:23:52.970303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:52.974341"], ["group_id", 1557], ["person_id", 1890], ["updated_at", "2014-10-13 13:23:52.974341"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1890]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:52.976693' WHERE "people"."id" = 1890 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:52.977493' WHERE "groups"."id" = 1557  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0001/edit" for 127.0.0.1 at 2014-10-13 14:23:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0001"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1889]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0001' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1890) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1556, 1557) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1556, 1557) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1890]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (31.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.9ms) Started DELETE "/memberships/312?referer=%2Fpeople%2Fsurname-0001%2Fedit" for 127.0.0.1 at 2014-10-13 14:23:53 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0001/edit", "id"=>"312"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1889]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 312]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 312]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1890]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:53.031968' WHERE "people"."id" = 1890 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1557]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:53.033622' WHERE "groups"."id" = 1557  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0001/edit Completed 302 Found in 7ms (ActiveRecord: 1.8ms) Started GET "/people/surname-0001/edit" for 127.0.0.1 at 2014-10-13 14:23:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0001"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1889]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0001' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1890) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 35ms (Views: 30.3ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1890]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1890]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:54.450585"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:54.450585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1558]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1558]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1558]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1558"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:54.456702"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:54.456702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:54.459354"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 13:23:54.459354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:54.461358"], ["group_id", 1559], ["person_id", 1891], ["updated_at", "2014-10-13 13:23:54.461358"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1891]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:54.462770' WHERE "people"."id" = 1891 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:54.463463' WHERE "groups"."id" = 1559  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (8.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (9.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 13.1ms | ActiveRecord: 1.8ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:55.006181"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:55.006181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1892]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1892) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 35ms (Views: 29.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Started GET "/people/surname-0002/edit" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0002"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0002' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1891) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1558, 1559) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1558, 1559) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1891]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0002" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0002", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1559", "leader"=>"0", "id"=>"313"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0002"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0002' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1891) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1891]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1891 AND "memberships"."id" != 313 AND "memberships"."group_id" = 1559) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1559 AND "memberships"."id" != 313 AND "memberships"."person_id" = 1891) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0002' AND "people"."given_name" = '' AND ("people"."id" != 1891) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1891 AND "memberships"."id" != 313 AND "memberships"."group_id" = 1559) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1559 AND "memberships"."id" != 313 AND "memberships"."person_id" = 1891) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1891 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:23:55.297083"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 313 [["role", "Head Honcho"], ["updated_at", "2014-10-13 13:23:55.298991"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:55.299779' WHERE "people"."id" = 1891 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:55.300336' WHERE "groups"."id" = 1559  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/surname-0002 Completed 302 Found in 21ms (ActiveRecord: 4.0ms) Started GET "/people/surname-0002" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0002"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1892]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0002' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1891) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1558, 1559) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1558, 1559) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (11.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 22ms (Views: 16.9ms | ActiveRecord: 1.5ms) Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1891]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:55.404752"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:55.404752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1560]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1560]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1560]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1560"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:55.409225"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:55.409225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.5ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:55.841770"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:55.841770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1893]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1893) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.5ms) Completed 200 OK in 35ms (Views: 29.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:23:55 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (32.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 40ms (Views: 38.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/add_membership.html.haml (17.0ms) Completed 200 OK in 22ms (Views: 20.3ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:56.217034"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:56.217034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1562]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1562]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1562]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1562"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:56.222633"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:56.222633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:56.660125"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:56.660125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1894]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1894) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (30.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.1ms) Completed 200 OK in 43ms (Views: 37.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.7ms) Completed 200 OK in 34ms (Views: 31.7ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1563", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:23:56.955234"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 13:23:56.955234"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:56.956433"], ["group_id", 1563], ["leader", "t"], ["person_id", 1895], ["role", "Head Honcho"], ["updated_at", "2014-10-13 13:23:56.956433"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1895]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:56.958325' WHERE "people"."id" = 1895 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1563]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:56.959825' WHERE "groups"."id" = 1563  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/taylor Completed 302 Found in 15ms (ActiveRecord: 2.4ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 14:23:56 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1894]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1895) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1562, 1563) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1562, 1563) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 16ms (Views: 11.0ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 1895]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:57.057179"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:57.057179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1564"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:57.063063"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:57.063063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:57.065708"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 13:23:57.065708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:57.067618"], ["group_id", 1565], ["person_id", 1896], ["updated_at", "2014-10-13 13:23:57.067618"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1896]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:57.069042' WHERE "people"."id" = 1896 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:57.069715' WHERE "groups"."id" = 1565  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 1564) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1564 [["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:57.072661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1564]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1564"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:23:57.077928"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:23:57.077928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/new.html.haml within layouts/peoplefinder/application (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:57.550726"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:57.550726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1897]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1897) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0003/edit" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0003"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1896) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1896]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (42.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 53ms (Views: 47.5ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/people/add_membership?id=surname-0003" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0003"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1896) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/add_membership.html.haml (5.3ms) Completed 200 OK in 12ms (Views: 5.6ms | ActiveRecord: 1.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:23:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0003" for 127.0.0.1 at 2014-10-13 14:23:58 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0003", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1565", "leader"=>"0", "id"=>"315"}, "70158044459820"=>{"role"=>"Talker", "group_id"=>"1566", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0003"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1896) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1896]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1896 AND "memberships"."id" != 315 AND "memberships"."group_id" = 1565) LIMIT 1 Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1565 AND "memberships"."id" != 315 AND "memberships"."person_id" = 1896) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0003' AND "people"."given_name" = '' AND ("people"."id" != 1896) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 1896 AND "memberships"."id" != 315 AND "memberships"."group_id" = 1565) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1565 AND "memberships"."id" != 315 AND "memberships"."person_id" = 1896) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1896 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:23:58.864260"]] SQL (0.3ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 315 [["role", ""], ["updated_at", "2014-10-13 13:23:58.865444"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:58.866368' WHERE "people"."id" = 1896 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:58.867316' WHERE "groups"."id" = 1565 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:58.868074"], ["group_id", 1566], ["person_id", 1896], ["role", "Talker"], ["updated_at", "2014-10-13 13:23:58.868074"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1896]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:23:58.869868' WHERE "people"."id" = 1896 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1566]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:23:58.871596' WHERE "groups"."id" = 1566  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/surname-0003 Completed 302 Found in 24ms (ActiveRecord: 5.2ms) Started GET "/people/surname-0003" for 127.0.0.1 at 2014-10-13 14:23:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0003"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1897]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0003' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1896) ORDER BY groups.name Peoplefinder::Group Load (1.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1566) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (7.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1566) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1564, 1565) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (12.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 3.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1896]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:58.972448"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:58.972448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1898]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1898]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1898]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1898) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1898]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1898]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:23:59.076879"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-d87e6c7f-c937-47cf-b7c9-b2c1e4e705de"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:23:59.076879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-d87e6c7f-c937-47cf-b7c9-b2c1e4e705de Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-d87e6c7f-c937-47cf-b7c9-b2c1e4e705de" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-d87e6c7f-c937-47cf-b7c9-b2c1e4e705de"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1898]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-d87e6c7f-c937-47cf-b7c9-b2c1e4e705de' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1899) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.104704"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.104704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1900]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1900) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.150853"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:23:59.150853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1901) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1901) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (36.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 47ms (Views: 41.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1901) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1901) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1901 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:23:59.234959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:59.243945"], ["updated_at", "2014-10-13 13:23:59.243945"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "5b3ac13a-0285-4b9b-96de-b02f2509ec36"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_to_email.erb (0.7ms) Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 15.8ms Sent mail to bob.smithe@digital.justice.gov.uk (6.7ms) Date: Mon, 13 Oct 2014 14:23:59 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bd26f3f167_fc4b3fcef0865bec333f8@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/5b3ac13a-0285-4b9b-96de-b02f2509ec36?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:59.268038"], ["updated_at", "2014-10-13 13:23:59.268038"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "b14cd7b6-e7ec-489f-bc2a-c8d57ad90cd8"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_from_email.erb (0.7ms) Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 13.1ms Sent mail to bob.smith@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 14:23:59 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd26f44163_fc4b3fcef0865bec33469@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/b14cd7b6-e7ec-489f-bc2a-c8d57ad90cd8?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 58ms (ActiveRecord: 2.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1900]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1901) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.311736"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.311736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1902]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1902]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1902]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1902) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.3ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:59.358876"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:23:59.358876"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:59.363508"], ["updated_at", "2014-10-13 13:23:59.363508"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "50ad5cb3-4f91-409a-bdde-27b8b19479ba"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/50ad5cb3-4f91-409a-bdde-27b8b19479ba?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"50ad5cb3-4f91-409a-bdde-27b8b19479ba"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '50ad5cb3-4f91-409a-bdde-27b8b19479ba' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1903]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1903) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.398746"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.398746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1904]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1904) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:23:59.446428"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 13:23:59.446428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1905) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1905) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/deleted_profile_email.erb (0.4ms) Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 8.1ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:23:59 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd26f7bba2_fc4b3fcef0865bec33540@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1905]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 22ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1904]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 33ms (Views: 30.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.565551"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.565551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1906]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1906) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.610375"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:23:59.610375"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1907) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 12ms (Views: 8.1ms | ActiveRecord: 0.9ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1907) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1907) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1907) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1907 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:23:59.686888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1906]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1907) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.715103"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.715103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1908]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1908) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.761352"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:23:59.761352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1909) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1909) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 39ms (Views: 31.7ms | ActiveRecord: 1.6ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1909) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1909) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1909 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:23:59.836482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:23:59.844855"], ["updated_at", "2014-10-13 13:23:59.844855"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "b85582b1-82f5-47b7-b2b4-92646968ea96"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_profile_email.erb (0.8ms) Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 13.6ms Sent mail to bob.smith@digital.justice.gov.uk (15.1ms) Date: Mon, 13 Oct 2014 14:23:59 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd26fd0da6_fc4b3fcef0865bec336d3@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/b85582b1-82f5-47b7-b2b4-92646968ea96?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 43ms (ActiveRecord: 2.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1908]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1909) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (1.0ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.898889"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:23:59.898889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1910]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1910) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 41ms (Views: 34.8ms | ActiveRecord: 1.4ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:23:59.947714"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:23:59.947714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1911) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:23:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1911) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 32.4ms | ActiveRecord: 1.4ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1911) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1911) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1911 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:00.024196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:00.032533"], ["updated_at", "2014-10-13 13:24:00.032533"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "ee6bfa52-b24b-4e46-8810-3e9799fb6377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_from_email.erb (0.3ms) Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 10.7ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:24:00 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd2709de4_fc4b3fcef0865bec3375b@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/ee6bfa52-b24b-4e46-8810-3e9799fb6377?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 31ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1910]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1911) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.2ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.073946"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.073946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1912]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1912]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1912]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1912) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1912]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1912]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:00.172402"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-91802f68-34a0-402a-9aea-d4c5ae0d9b10"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:00.172402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-91802f68-34a0-402a-9aea-d4c5ae0d9b10 Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-91802f68-34a0-402a-9aea-d4c5ae0d9b10" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-91802f68-34a0-402a-9aea-d4c5ae0d9b10"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1912]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-91802f68-34a0-402a-9aea-d4c5ae0d9b10' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1913) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (14.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 24ms (Views: 19.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.211834"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.211834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1914]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.1ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1914) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (33.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 47ms (Views: 39.3ms | ActiveRecord: 1.6ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:00.268641"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-0c8b05a2-6621-4c80-948b-718f8159101f"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 13:24:00.268641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-0c8b05a2-6621-4c80-948b-718f8159101f/edit" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-0c8b05a2-6621-4c80-948b-718f8159101f"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0c8b05a2-6621-4c80-948b-718f8159101f' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1915) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-0c8b05a2-6621-4c80-948b-718f8159101f" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-0c8b05a2-6621-4c80-948b-718f8159101f"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0c8b05a2-6621-4c80-948b-718f8159101f' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1915) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1915]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1914]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.353398"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.353398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1916]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1916) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 40ms (Views: 35.2ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.402251"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:00.402251"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1917) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.3ms) Completed 200 OK in 16ms (Views: 11.5ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1917) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (28.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1917) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1917) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1917 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:00.488382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1916]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1917) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 14ms (Views: 9.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.517385"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.517385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1918]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1918]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1918]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1918) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (13.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (38.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 51ms (Views: 45.0ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1918]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1918]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:00.630785"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:00.630785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:00.637717"], ["updated_at", "2014-10-13 13:24:00.637717"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "5e8c425b-5ee2-4ace-94e4-cd65b0c7bc90"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/new_profile_email.erb (0.7ms) Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 13.0ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:24:00 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd2709e3ef_fc4b3fcef0865bec33878@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/5e8c425b-5ee2-4ace-94e4-cd65b0c7bc90?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 30ms (ActiveRecord: 1.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1918]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1919) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.685148"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.685148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1920]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1920) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.1ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.733666"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-80fabca4-70df-4d1e-a500-dad660160a58"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:00.733666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-80fabca4-70df-4d1e-a500-dad660160a58" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-80fabca4-70df-4d1e-a500-dad660160a58"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-80fabca4-70df-4d1e-a500-dad660160a58' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1921) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 1.2ms) Started GET "/people/test-user-80fabca4-70df-4d1e-a500-dad660160a58/edit" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-80fabca4-70df-4d1e-a500-dad660160a58"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-80fabca4-70df-4d1e-a500-dad660160a58' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1921) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-80fabca4-70df-4d1e-a500-dad660160a58" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-80fabca4-70df-4d1e-a500-dad660160a58"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-80fabca4-70df-4d1e-a500-dad660160a58' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1921) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1921) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1921 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:24:00.811077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-80fabca4-70df-4d1e-a500-dad660160a58 Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user-80fabca4-70df-4d1e-a500-dad660160a58" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-80fabca4-70df-4d1e-a500-dad660160a58"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1920]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-80fabca4-70df-4d1e-a500-dad660160a58' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1921) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:00.842509"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:00.842509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1922]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1922) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (39.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 53ms (Views: 45.0ms | ActiveRecord: 1.4ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (1.0ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:00.907677"], ["email", "test.user"], ["slug", "test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 13:24:00.907677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f/edit" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1923) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (31.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.0ms) Completed 200 OK in 44ms (Views: 38.0ms | ActiveRecord: 1.2ms) Started DELETE "/people/test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c8e048c-605c-4bd3-80ff-aec35ff99d1f' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1923) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1923]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1922]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (9.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 17ms (Views: 15.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.006999"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.006999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1924]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1924) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (30.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.5ms) Completed 200 OK in 43ms (Views: 37.0ms | ActiveRecord: 1.4ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.060489"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-798277d9-69b9-4560-86e5-97a9c6789d2b"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:01.060489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-798277d9-69b9-4560-86e5-97a9c6789d2b" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-798277d9-69b9-4560-86e5-97a9c6789d2b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-798277d9-69b9-4560-86e5-97a9c6789d2b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1925) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 1.4ms) Started GET "/people/test-user-798277d9-69b9-4560-86e5-97a9c6789d2b/edit" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-798277d9-69b9-4560-86e5-97a9c6789d2b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-798277d9-69b9-4560-86e5-97a9c6789d2b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1925) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (31.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 45ms (Views: 38.4ms | ActiveRecord: 1.6ms) Started PATCH "/people/test-user-798277d9-69b9-4560-86e5-97a9c6789d2b" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-798277d9-69b9-4560-86e5-97a9c6789d2b"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-798277d9-69b9-4560-86e5-97a9c6789d2b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1925) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1925) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 1925 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:01.152188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:01.160300"], ["updated_at", "2014-10-13 13:24:01.160300"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "1d886654-9ee7-4071-bde8-05330136a65b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/user_update_mailer/updated_address_to_email.erb (0.4ms) Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 10.2ms Sent mail to bob.smith@digital.justice.gov.uk (6.3ms) Date: Mon, 13 Oct 2014 14:24:01 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd27128db5_fc4b3fcef0865bec339dc@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/1d886654-9ee7-4071-bde8-05330136a65b?desired_path=%2Fpeople%2Ftest-user-798277d9-69b9-4560-86e5-97a9c6789d2b. Redirected to http://www.example.com/people/test-user-798277d9-69b9-4560-86e5-97a9c6789d2b Completed 302 Found in 33ms (ActiveRecord: 2.4ms) Started GET "/people/test-user-798277d9-69b9-4560-86e5-97a9c6789d2b" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-798277d9-69b9-4560-86e5-97a9c6789d2b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1924]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-798277d9-69b9-4560-86e5-97a9c6789d2b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1925) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 16ms (Views: 11.0ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.204071"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.204071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1926]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1926) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (38.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 49ms (Views: 44.0ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:01.261332"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 13:24:01.261332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0007/edit" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0007"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0007' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1927) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0007" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0007"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0007' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1927) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1927]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1926]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.338232"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.338232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1928]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1928) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 38ms (Views: 33.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:01.384711"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-09d92f8e-dc89-45f6-b655-6051f0622adc"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 13:24:01.384711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-09d92f8e-dc89-45f6-b655-6051f0622adc/edit" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-09d92f8e-dc89-45f6-b655-6051f0622adc"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-09d92f8e-dc89-45f6-b655-6051f0622adc' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1929) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 37ms (Views: 30.9ms | ActiveRecord: 1.2ms) Started DELETE "/people/test-user-09d92f8e-dc89-45f6-b655-6051f0622adc" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-09d92f8e-dc89-45f6-b655-6051f0622adc"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-09d92f8e-dc89-45f6-b655-6051f0622adc' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1929) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1929]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1928]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/new.html.haml within layouts/peoplefinder/application (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.463021"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.463021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1930]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1930) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:01.506941"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:01.506941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1931) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1931) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (38.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.9ms) Completed 200 OK in 50ms (Views: 44.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1931) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1931) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 1931 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:24:01.593007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1930]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1931) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (2.4ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.620593"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.620593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1932]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1932]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1932]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1932) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1932]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 29ms (Views: 26.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1932]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:01.709559"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:01.709559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1932]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1933) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.736158"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.736158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1934]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1934) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.6ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.779897"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:01.779897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1935) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544/edit" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1935) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (10.5ms) Completed 200 OK in 46ms (Views: 41.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1935) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 1935) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 1935 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:24:01.862146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544 Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1934]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c9a3f2f0-4eb0-43be-915a-db4ec8e53544' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1935) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.7ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:01.890558"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:01.890558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1936]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1936) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/edit.html.haml within layouts/peoplefinder/application (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1936]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/new.html.haml within layouts/peoplefinder/application (30.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 39ms (Views: 36.8ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:01 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1936]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:01.995154"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-8a7888e9-8f3e-42b4-b826-234399d18161"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:01.995154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-8a7888e9-8f3e-42b4-b826-234399d18161 Completed 302 Found in 12ms (ActiveRecord: 1.4ms) Started GET "/people/test-user-8a7888e9-8f3e-42b4-b826-234399d18161" for 127.0.0.1 at 2014-10-13 14:24:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8a7888e9-8f3e-42b4-b826-234399d18161"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8a7888e9-8f3e-42b4-b826-234399d18161' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1937) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/show.html.haml within layouts/peoplefinder/application (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Rendered /Users/tobyprivett/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/moj_internal_template-e90118ed0982/app/views/layouts/moj_internal_template.html.erb (1.8ms) Completed 200 OK in 15ms (Views: 9.8ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:02.021457"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:24:02.021457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:02.036660"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:24:02.036660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.040302"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:24:02.040302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:02.047826"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:02.047826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.054358"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 13:24:02.054358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.065420"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:02.065420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1943"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1942]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1943' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1943]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/person_image/edit.html.haml within layouts/peoplefinder/application (0.3ms) Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.084195"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 13:24:02.084195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.090092"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:02.090092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"1945"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1944]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1945' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1945]] Redirected to http://test.host/people/doe?cache_bust=1413206642 Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.100079"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 13:24:02.100079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.102546"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 13:24:02.102546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"1947"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1946]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '1947' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1947]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.110040"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 13:24:02.110040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.112418"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:02.112418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1948]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.123077"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 13:24:02.123077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.129912"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.129912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1950]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.137294"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 13:24:02.137294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1951]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.144300"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 13:24:02.144300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.150372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.150372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1568]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1568]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1568]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1568"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.155907"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.155907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1952]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.164060"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 13:24:02.164060"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.167307"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.167307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1570]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1570]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1570]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1570"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.173425"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.173425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0004"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1953]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0004' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1571) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1570]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1570]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1570/1571/%' OR "groups"."ancestry" = '1570/1571')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1570/1571' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1571]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0003 Completed 302 Found in 10ms (ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.189207"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 13:24:02.189207"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.196857"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.196857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1572]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1572]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1572]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1572"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.201655"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.201655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0005"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1954]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0005' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1573) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1572]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1572]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1572/1573/%' OR "groups"."ancestry" = '1572/1573')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1572/1573' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1573]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 21ms (ActiveRecord: 2.1ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.229740"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 13:24:02.229740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.237204"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.237204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1574]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1574]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1574]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1574"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.241831"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.241831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0006"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1955]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0006' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1575) ORDER BY people.surname Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.253001"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 13:24:02.253001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.260632"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.260632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1576]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1576]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1576]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1576"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.265594"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.265594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0007"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1956]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0007' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1577) ORDER BY people.surname Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.277011"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 13:24:02.277011"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.284264"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.284264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1578"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.288846"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.288846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0008"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1957]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0008' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1579) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1578]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1579) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1579) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.304462"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 13:24:02.304462"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.312113"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.312113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1580"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.317088"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.317088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0009"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1958]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0009' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1581) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1580]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1581) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1581) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.333385"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 13:24:02.333385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.340788"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.340788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1582"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.345408"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.345408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0010"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1959]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0010' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1583) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1582]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1583) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1583) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.360762"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 13:24:02.360762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.368279"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.368279"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1584]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1584]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1584]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1584"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.373113"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.373113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0011", "team_email_address"=>"example.user.30@digital.justice.gov.uk"}, "id"=>"group-0011"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1960]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0011' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1585) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0011' AND "groups"."id" != 1585) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0011 Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.386512"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 13:24:02.386512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.393955"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.393955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1586"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.399411"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.399411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0013", "team_email_address"=>"example.user.34@digital.justice.gov.uk"}, "id"=>"group-0012"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1961]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0012' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1587) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1586]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1587) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0013' AND "groups"."id" != 1587) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 1587 [["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.416062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0013 Completed 302 Found in 12ms (ActiveRecord: 2.8ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1587]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.421733"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 13:24:02.421733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.429168"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.429168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1588]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1588]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1588]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1588"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.433881"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.433881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0014", "team_email_address"=>"example.user.35@digital.justice.gov.uk"}, "id"=>"group-0014"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1962]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0014' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1589) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0014' AND "groups"."id" != 1589) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0014 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.446291"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 13:24:02.446291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1963]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.456746"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 13:24:02.456746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1964]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.468603"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 13:24:02.468603"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1965]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.478822"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 13:24:02.478822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0015", "team_email_address"=>"example.user.37@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1966]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.484140"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.484140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0015 Completed 302 Found in 4ms (ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.489345"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 13:24:02.489345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0016", "team_email_address"=>"example.user.38@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1967]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.495967"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.495967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0016 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.500936"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 13:24:02.500936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0017", "team_email_address"=>"example.user.39@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1968]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.506709"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.506709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0017 Completed 302 Found in 5ms (ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.512302"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 13:24:02.512302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1969]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.519586"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 13:24:02.519586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1970]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.547789"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.547789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1593]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1593]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1593]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1593"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:02.552560"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.552560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1594]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1594]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1594]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1593/1594"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:02.557594"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.557594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (6.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:02.575323"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:02.575323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:02.578203"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:24:02.578203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.7ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1971]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:03.602858"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:03.602858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1972]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1972]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1972]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1972) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.9ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:03 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1972]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.5ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 14:24:03 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1972]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1971) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 1971]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 0.9ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.1ms) DELETE FROM "groups" SQL (0.3ms) DELETE FROM "versions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:03.763646"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:24:03.763646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:03.766932"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:24:03.766932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:03.775117"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:03.775117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1597]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1597]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1597]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1597"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:03.780720"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:03.780720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:03.783464"], ["group_id", 1598], ["person_id", 1974], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:03.783464"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1974]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:03.785782' WHERE "people"."id" = 1974 SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:03.786821' WHERE "groups"."id" = 1598  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1973]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1974]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE 1=0 ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:04.817601"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:24:04.817601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:04.820232"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:24:04.820232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:04.826885"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:04.826885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1599]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1599"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:04.832963"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:04.832963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:04.835757"], ["group_id", 1600], ["person_id", 1976], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:04.835757"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1976]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:04.837879' WHERE "people"."id" = 1976 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:04.838907' WHERE "groups"."id" = 1600  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1975]] SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1976]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:05.864534"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:24:05.864534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:05.866977"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:24:05.866977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:05.873003"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:05.873003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1601]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1601]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1601]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1601"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:05.877456"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:05.877456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:05.879441"], ["group_id", 1602], ["person_id", 1978], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:05.879441"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1978]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:05.880977' WHERE "people"."id" = 1978 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:05.881621' WHERE "groups"."id" = 1602  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1977]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1978]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1976, 1974) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1976, 1974) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1976, 1974) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:06.902232"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:24:06.902232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:06.905069"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:24:06.905069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:06.911760"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:06.911760"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1603]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1603]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1603]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1603"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:06.918640"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:06.918640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:06.921344"], ["group_id", 1604], ["person_id", 1980], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:06.921344"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1980]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:06.923360' WHERE "people"."id" = 1980 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:06.924159' WHERE "groups"."id" = 1604  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1979]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1980]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1973, 1977, 1975) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:07.947172"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 13:24:07.947172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:07.949656"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 13:24:07.949656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:07.955862"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:07.955862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1605]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1605]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1605]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1605"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:07.960374"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:07.960374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:07.962280"], ["group_id", 1606], ["person_id", 1982], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:07.962280"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1982]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:07.963745' WHERE "people"."id" = 1982 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:07.964412' WHERE "groups"."id" = 1606  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1981]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1982]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (1978, 1980, 1974, 1976) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK SQL (0.2ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.1ms) DELETE FROM "groups" SQL (0.1ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:09.037238"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 13:24:09.037238"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:09.046412"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:09.046412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1983]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.088156"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:09.088156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1984]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1984) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:09.152889"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:09.152889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1608]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1608]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1608]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1608"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:09.160841"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:09.160841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:09.164044"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:24:09.164044"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.166397"], ["group_id", 1609], ["leader", "t"], ["person_id", 1985], ["role", "Jefe"], ["updated_at", "2014-10-13 13:24:09.166397"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1985]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:09.168091' WHERE "people"."id" = 1985 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:09.168830' WHERE "groups"."id" = 1609  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1985) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1608, 1609) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1608, 1609) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1985]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.0ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/322?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"322"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]] Peoplefinder::Membership Load (0.9ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 322]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 322]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.233907"], ["event", "destroy"], ["item_id", 322], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 322\ngroup_id: 1609\nperson_id: 1985\nrole: Jefe\ncreated_at: 2014-10-13 13:24:09.166397000 Z\nupdated_at: 2014-10-13 13:24:09.166397000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 322], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1985]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:09.238865' WHERE "people"."id" = 1985 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1609]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:09.240975' WHERE "groups"."id" = 1609  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 22ms (ActiveRecord: 5.3ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1985) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1984]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.8ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 322]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1985]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1609]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 22.3ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.334408"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:09.334408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1986]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1986) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.2ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:09.390610"], ["slug", "surname-0035"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 13:24:09.390610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0035/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1987) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/surname-0035" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0035", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0035"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1987) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0035' AND "people"."given_name" = '' AND ("people"."id" != 1987) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1987]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 1987 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:09.455668"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:09.470921"], ["event", "update"], ["item_id", 1987], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1987\ngiven_name: \nsurname: Surname-0035\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 13:24:09.390610000 Z\nupdated_at: 2014-10-13 13:24:09.390610000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1987\n given_name: ''\n surname: Surname-0035\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 13:24:09.455668000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0035\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1987\n given_name: ''\n surname: Surname-0035\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 13:24:09.390610000 Z\n updated_at: &2 2014-10-13 13:24:09.455668000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0035\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1987\n given_name: ''\n surname: Surname-0035\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0035\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70158038757980\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1987\n given_name: ''\n surname: Surname-0035\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0035\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206649-64587-6404\n cache_id: 1413206649-64587-6404\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206649-64587-6404/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70158038754280\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 1987\n given_name: ''\n surname: Surname-0035\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0035\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206649-64587-6404\n cache_id: 1413206649-64587-6404\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206649-64587-6404/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413206649-64587-6404\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206649-64587-6404/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0035/image/edit Completed 302 Found in 34ms (ActiveRecord: 3.0ms) Started GET "/people/surname-0035/image/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (12.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (12.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 22.5ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1986]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1987]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.531962"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:09.531962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1988]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1988) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 38ms (Views: 32.1ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:09.577928"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 13:24:09.577928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1989) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1989) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 1989) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1989 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 13:24:09.637024"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:09.640989"], ["event", "update"], ["item_id", 1989], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1989\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:24:09.577928000 Z\nupdated_at: 2014-10-13 13:24:09.577928000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 14ms (ActiveRecord: 2.0ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1989) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1989]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.8ms) Started POST "/audit_trail/undo/172" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 172]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1989]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1989) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 1989 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 13:24:09.683413"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:09.686745"], ["event", "update"], ["item_id", 1989], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1989\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:24:09.577928000 Z\nupdated_at: 2014-10-13 13:24:09.637024000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1988]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1989]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1989]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.8ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 1989]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.710703"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:09.710703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1990]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1990) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:09.761704"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:09.761704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1610"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:09.767735"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:09.767735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1611) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1610, 1611) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1610) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (22.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1610/1611' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.2ms | ActiveRecord: 2.4ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"1610", "team_email_address"=>"example.user.57@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1611) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1610]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1611) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 1611) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1611 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 13:24:09.827566"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:09.831773"], ["event", "update"], ["item_id", 1611], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1611\nname: original name\ncreated_at: 2014-10-13 13:24:09.767735000 Z\nupdated_at: 2014-10-13 13:24:09.767735000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '1610'\nancestry_depth: 1\nteam_email_address: example.user.57@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 16ms (ActiveRecord: 2.8ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1611) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1610, 1611) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1611]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (4.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1610/1611' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1610/1611' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1611]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.2ms | ActiveRecord: 2.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1990]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1611]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.883534"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:09.883534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1991]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1991) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.0ms | ActiveRecord: 0.4ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:09.985300"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:24:09.985300"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:09.987828"], ["event", "create"], ["item_id", 1992], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 12ms (ActiveRecord: 1.5ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 14:24:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1992) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 1.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1992]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 1.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/175" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"175"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 175]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1992]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 1992]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1992]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:10.043768"], ["event", "destroy"], ["item_id", 1992], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1992\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:24:09.985300000 Z\nupdated_at: 2014-10-13 13:24:09.985300000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1992], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1991]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1992]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1992]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:10.073521"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:10.073521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1993]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1993) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 49.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:10.143724"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:10.143724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1612"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:10.148575"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:10.148575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1613) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1612, 1613) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1612) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1612/1613' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 18.5ms | ActiveRecord: 2.7ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1613) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]] CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1612]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1612/1613/%' OR "groups"."ancestry" = '1612/1613')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1612/1613' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1613]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:10.193254"], ["event", "destroy"], ["item_id", 1613], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1613\nname: original name\ncreated_at: 2014-10-13 13:24:10.148575000 Z\nupdated_at: 2014-10-13 13:24:10.148575000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '1612'\nancestry_depth: 1\nteam_email_address: example.user.59@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1613], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 13ms (ActiveRecord: 2.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1612) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1612) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1612]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1612' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1612' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1612]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 2.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1993]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1613]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.0ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:10.248431"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:10.248431"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:10.250565"], ["event", "create"], ["item_id", 1614], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.62@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1614]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1614]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1614]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1614"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:10.256600"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:10.256600"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:10.259284"], ["event", "create"], ["item_id", 1615], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.61@digital.justice.gov.uk\nancestry:\n- \n- '1614'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:10.262435"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:24:10.262435"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:10.264071"], ["event", "create"], ["item_id", 1994], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:10.733094"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:10.733094"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:10.735111"], ["event", "create"], ["item_id", 1995], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1995]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 12ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1995) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.2ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1994) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:10 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"1615", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1994) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 1994) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 1994 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:11.010623"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:11.014292"], ["event", "update"], ["item_id", 1994], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1994\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:24:10.262435000 Z\nupdated_at: 2014-10-13 13:24:10.262435000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.015233"], ["group_id", 1615], ["person_id", 1994], ["role", "Jefe"], ["updated_at", "2014-10-13 13:24:11.015233"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.017119"], ["event", "create"], ["item_id", 323], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 1615\nperson_id:\n- \n- 1994\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1994]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:11.018824' WHERE "people"."id" = 1994 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1615]] SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:11.020465' WHERE "groups"."id" = 1615  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/bob Completed 302 Found in 23ms (ActiveRecord: 3.5ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1994) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1614, 1615) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1614, 1615) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 1.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 323]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1994]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1615]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1994]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1995]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1994]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1615]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1614]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 15.1ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.215644"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.215644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1996]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1996) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:11.285483"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 13:24:11.285483"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.287604"], ["event", "create"], ["item_id", 1616], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1616) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1616) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1616]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1616' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1616' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1616]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1996]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1616]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.331678"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.331678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1997]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1997) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.376882"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:24:11.376882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1998) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1998) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 1998]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.427999"], ["event", "destroy"], ["item_id", 1998], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 1998\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:24:11.376882000 Z\nupdated_at: 2014-10-13 13:24:11.376882000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1998], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 12ms (ActiveRecord: 2.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.8ms | ActiveRecord: 0.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1998]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 16.9ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/185" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"185"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 185]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1998]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 1998) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.376882"], ["given_name", "Greg"], ["id", 1998], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:24:11.486944"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.489489"], ["event", "create"], ["item_id", 1998], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1997]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1998]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1998]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.515213"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.515213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1999]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 1999]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1999]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (1999) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.573007"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.573007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1617"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:11.579395"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.579395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1618]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1618]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1618]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1617/1618"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:11.584459"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.584459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1619]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1619]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.7ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1617/1618/1619"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:11.591576"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.591576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1617) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1617 [["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.596265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1617"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:11.600846"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.600846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1999]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1621) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1617, 1621) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1621]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1617/1621' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1617/1621' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1621]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 2.2ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1999]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1621) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1617, 1621) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1617]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1617) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1617/1621' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.7ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 1999]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1621) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1617, 1621) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1621 OR "groups"."ancestry" ILIKE '1617/1621/%') OR "groups"."ancestry" = '1617/1621')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.1ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1621) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 3.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.687176"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.687176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2000]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2000]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2000]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2000) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.739589"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.739589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1622]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1622]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1622]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1622"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:11.745220"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.745220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1623]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1623]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1623]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1622/1623"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:11.750144"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.750144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1624]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1624]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1622/1623/1624"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:11.755418"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.755418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2000]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1625) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1622, 1623, 1624, 1625) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.6ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1625]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1622/1623/1624/1625' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1622/1623/1624/1625' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1625]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.792866"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.792866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2001]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2001]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 21ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2001]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2001) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.854357"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.854357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1626]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1626"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:11.859731"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.859731"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1627]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1627]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1627]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1626/1627"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:11.865116"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.865116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1628]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1626/1627/1628"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:11.871131"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.871131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2001]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1626) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1626) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1626]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.7ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2001]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1627) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1626, 1627) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1627]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.9ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2001]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1628) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1626, 1627, 1628) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1628]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627/1628' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627/1628' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1626/1627/1628' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:11.941202"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:11.941202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2002]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2002]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:11 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2002]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2002) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:11.990324"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.990324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1630]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1630]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1630]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1630"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:11.996450"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:11.996450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1631]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1631]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1631]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1630/1631"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:12.001826"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.001826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1632]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1632]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1632]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1630/1631/1632"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:12.007405"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.007405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.010424"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:24:12.010424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.012566"], ["group_id", 1631], ["person_id", 2003], ["updated_at", "2014-10-13 13:24:12.012566"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.013378' WHERE "people"."id" = 2003 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.014084' WHERE "groups"."id" = 1631  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.016669"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:24:12.016669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.018327"], ["group_id", 1631], ["person_id", 2004], ["updated_at", "2014-10-13 13:24:12.018327"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.019043' WHERE "people"."id" = 2004 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.019669' WHERE "groups"."id" = 1631  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.022420"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:24:12.022420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.024450"], ["group_id", 1631], ["person_id", 2005], ["updated_at", "2014-10-13 13:24:12.024450"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.025294' WHERE "people"."id" = 2005 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.026049' WHERE "groups"."id" = 1631  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2002]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1631) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1630, 1631) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1631]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1630/1631' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1630/1631' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1630/1631' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.063411"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.063411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1634]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1634]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1634]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1634"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:12.068441"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.068441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1635]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1635]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1635]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1634/1635"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:12.073172"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.073172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1636]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1636]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1636]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1634/1635/1636"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:12.080142"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.080142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:12.573947"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:12.573947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2006]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2006]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 12ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2006]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2006) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (43.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 62ms (Views: 55.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2006]] Peoplefinder::Group Load (1.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2006]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2006]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:12.870212"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:12.870212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2007]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2007]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2007]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2007) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.919279"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.919279"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1638]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1638]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1638"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:12.924878"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.924878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1639]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1639]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1639]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1638/1639"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:12.929556"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.929556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1640]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1640]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1640]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1638/1639/1640"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:12.934233"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:12.934233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.937029"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:24:12.937029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.938667"], ["group_id", 1639], ["person_id", 2008], ["updated_at", "2014-10-13 13:24:12.938667"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.939341' WHERE "people"."id" = 2008 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.939944' WHERE "groups"."id" = 1639  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.942229"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:24:12.942229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.943733"], ["group_id", 1639], ["person_id", 2009], ["updated_at", "2014-10-13 13:24:12.943733"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.944397' WHERE "people"."id" = 2009 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.944975' WHERE "groups"."id" = 1639  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:12.947271"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:24:12.947271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:12.948675"], ["group_id", 1639], ["person_id", 2010], ["updated_at", "2014-10-13 13:24:12.948675"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:12.949357' WHERE "people"."id" = 2010 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:12.949968' WHERE "groups"."id" = 1639  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2007]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1639) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1638, 1639) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1639]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1638/1639' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1638/1639' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1638/1639' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 1.9ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2007]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1639) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1638, 1639) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1639 OR "groups"."ancestry" ILIKE '1638/1639/%') OR "groups"."ancestry" = '1638/1639')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.1ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1641,1640,1639) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:12 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:13.004708"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:13.004708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2011]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2011]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2011]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2011) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:13.053902"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.053902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1642]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1642]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1642]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1642"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:13.059440"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.059440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1643]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1643]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1643]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1642/1643"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:13.064466"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.064466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1644]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1642/1643/1644"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:13.069326"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.069326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:13.071819"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:24:13.071819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:13.073400"], ["group_id", 1645], ["person_id", 2012], ["updated_at", "2014-10-13 13:24:13.073400"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:13.074091' WHERE "people"."id" = 2012 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:13.074724' WHERE "groups"."id" = 1645  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:13.077108"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:24:13.077108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:13.078786"], ["group_id", 1645], ["person_id", 2013], ["updated_at", "2014-10-13 13:24:13.078786"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:13.079479' WHERE "people"."id" = 2013 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:13.080068' WHERE "groups"."id" = 1645  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:13.082411"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:24:13.082411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:13.083852"], ["group_id", 1645], ["person_id", 2014], ["updated_at", "2014-10-13 13:24:13.083852"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:13.084465' WHERE "people"."id" = 2014 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:13.085002' WHERE "groups"."id" = 1645  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2011]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1645) ORDER BY people.surname Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1642, 1643, 1644, 1645) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (5.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1645]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1642/1643/1644/1645' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1642/1643/1644/1645' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1645]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 18.1ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:13.145853"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.145853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1646]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1646]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1646]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1646"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:13.151802"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.151802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1647]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1647]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1646/1647"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:13.157082"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.157082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1648]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1648]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1648]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1646/1647/1648"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:13.162114"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:13.162114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:13.620371"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:13.620371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2015]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2015) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 5.8ms | ActiveRecord: 0.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.1ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:24:13 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (1.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1649) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1646, 1647, 1648, 1649) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1649]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1646/1647/1648/1649' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1646/1647/1648/1649' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1649]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 15.4ms | ActiveRecord: 3.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.000924"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 13:24:14.000924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0037' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.003903"], ["slug", "surname-0037"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 13:24:14.003903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.012144"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.012144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1650]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1650]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1650]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1650"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.016689"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.016689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.017987"], ["group_id", 1651], ["person_id", 2017], ["updated_at", "2014-10-13 13:24:14.017987"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.018693' WHERE "people"."id" = 2017 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.019329' WHERE "groups"."id" = 1651  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"333"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2016]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 333]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 333]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2017]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.024476' WHERE "people"."id" = 2017 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1651]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.025929' WHERE "groups"."id" = 1651  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.030569"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 13:24:14.030569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0039' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.033996"], ["slug", "surname-0039"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 13:24:14.033996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.041856"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.041856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1652]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1652]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1652]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1652"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.046148"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.046148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.047341"], ["group_id", 1653], ["person_id", 2019], ["updated_at", "2014-10-13 13:24:14.047341"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.047962' WHERE "people"."id" = 2019 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.048544' WHERE "groups"."id" = 1653  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"334"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2018]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 334]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 334]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2019]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.053139' WHERE "people"."id" = 2019 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1653]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.054427' WHERE "groups"."id" = 1653  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 334]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.064305"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.064305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1654]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1654]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1654]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1654"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.069088"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.069088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1655]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1655]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1655]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1654/1655"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.075091"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.075091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1656]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1656]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1656]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1654/1655/1656"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:14.080150"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.080150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1654, 1655, 1656, 1657) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.087325"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.087325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1658]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1658]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1658]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1658"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.091506"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.091506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1659]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1659]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1659]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1658/1659"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.096194"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.096194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1660]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1660]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1658/1659/1660"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:14.101390"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.101390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0024' AND "groups"."id" != 1659) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.127224"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.127224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1662) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.134327"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.134327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1663]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1663]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1663]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1663"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.139054"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.139054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.146835"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.146835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1665"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.151550"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.151550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1665) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1665 [["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.154532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1665]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1665"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.160012"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.160012"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.167212"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.167212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1668"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.173009"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.173009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1668) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1668 [["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.176566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1668"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.181537"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.181537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1668) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1668 [["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.184525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1668]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1668"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.190293"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.190293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.197534"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.197534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1672]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1672]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1672]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1672"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.202232"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.202232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.209597"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.209597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1674"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.214229"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.214229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1674]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1675) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 1675) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 1675 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 13:24:14.218571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1675]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.225753"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.225753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1676'  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.232749"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.232749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.239044"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.239044"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1678]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1678]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1678]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1678"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.244053"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.244053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1678]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1678'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.255144"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.255144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1680]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1680]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1680]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1680"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.260275"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.260275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1680/1681' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.267790"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.267790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1682]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1682]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1682]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1682"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.272122"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.272122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1682/1683' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.280449"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.280449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1684]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1684]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1684]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1684"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.285190"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.285190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.288642"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:24:14.288642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.290784"], ["group_id", 1685], ["person_id", 2020], ["updated_at", "2014-10-13 13:24:14.290784"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.291470' WHERE "people"."id" = 2020 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1685]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.292850' WHERE "groups"."id" = 1685  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1685 OR "groups"."ancestry" ILIKE '1684/1685/%') OR "groups"."ancestry" = '1684/1685')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1685) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.301840"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.301840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1686]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1686]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1686]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1686"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.306870"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.306870"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.310162"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:24:14.310162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.312216"], ["group_id", 1687], ["person_id", 2021], ["updated_at", "2014-10-13 13:24:14.312216"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.312906' WHERE "people"."id" = 2021 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1687]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.314326' WHERE "groups"."id" = 1687  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1687]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1687]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1687]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1686/1687"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.319155"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.319155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.322407"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:24:14.322407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.324514"], ["group_id", 1688], ["person_id", 2022], ["updated_at", "2014-10-13 13:24:14.324514"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.325169' WHERE "people"."id" = 2022 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1688]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.326442' WHERE "groups"."id" = 1688  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1687 OR "groups"."ancestry" ILIKE '1686/1687/%') OR "groups"."ancestry" = '1686/1687')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1687,1688) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.335683"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.335683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1689]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1689]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1689"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.340370"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.340370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.343569"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:24:14.343569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.345639"], ["group_id", 1690], ["person_id", 2023], ["updated_at", "2014-10-13 13:24:14.345639"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.346310' WHERE "people"."id" = 2023 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1690]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.347582' WHERE "groups"."id" = 1690  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1690]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1690]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1690]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1689/1690"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.352674"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.352674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.355963"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:24:14.355963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.357950"], ["group_id", 1691], ["person_id", 2024], ["updated_at", "2014-10-13 13:24:14.357950"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.358639' WHERE "people"."id" = 2024 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1691]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.360052' WHERE "groups"."id" = 1691  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.361780"], ["group_id", 1691], ["person_id", 2024], ["updated_at", "2014-10-13 13:24:14.361780"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.362435' WHERE "people"."id" = 2024 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1691]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.363632' WHERE "groups"."id" = 1691  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1690 OR "groups"."ancestry" ILIKE '1689/1690/%') OR "groups"."ancestry" = '1689/1690')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1690,1691) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.372980"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.372980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1692]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1692]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1692"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.378436"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.378436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.382129"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:24:14.382129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.385543"], ["group_id", 1693], ["person_id", 2025], ["updated_at", "2014-10-13 13:24:14.385543"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.386431' WHERE "people"."id" = 2025 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1693]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.388085' WHERE "groups"."id" = 1693  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1693]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1693]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1692/1693"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.394319"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.394319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.398067"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 13:24:14.398067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.400145"], ["group_id", 1694], ["person_id", 2026], ["updated_at", "2014-10-13 13:24:14.400145"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.400796' WHERE "people"."id" = 2026 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1694]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.402044' WHERE "groups"."id" = 1694  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.403678"], ["group_id", 1694], ["person_id", 2026], ["updated_at", "2014-10-13 13:24:14.403678"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.404308' WHERE "people"."id" = 2026 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1694]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.405643' WHERE "groups"."id" = 1694  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1693 OR "groups"."ancestry" ILIKE '1692/1693/%') OR "groups"."ancestry" = '1692/1693')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1693,1694) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.415186"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.415186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1695]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1695]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1695]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1695"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.419857"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.419857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.423001"], ["slug", "surname-0040"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 13:24:14.423001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.424800"], ["group_id", 1696], ["person_id", 2027], ["updated_at", "2014-10-13 13:24:14.424800"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.425503' WHERE "people"."id" = 2027 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1696]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.426888' WHERE "groups"."id" = 1696  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1695/1696' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1696]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.437776"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.437776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1697]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1697]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1697]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1697"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.442539"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.442539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1697/1698' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1698]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.452841"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.452841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1699]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1699"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.457606"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.457606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.460561"], ["slug", "surname-0041"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 13:24:14.460561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.462121"], ["group_id", 1700], ["person_id", 2028], ["updated_at", "2014-10-13 13:24:14.462121"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.462853' WHERE "people"."id" = 2028 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1700]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.464167' WHERE "groups"."id" = 1700  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1699/1700' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 1700]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.474696"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.474696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1701]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1701]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1701]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1701"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.479720"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.479720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1702]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1702]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1702]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1701/1702"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:14.484884"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.484884"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1702]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1701/1702' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.493381"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.493381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1704"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.498468"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.498468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1704]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.508513"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.508513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.524618"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.524618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1707]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1707]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1707]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1707"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.529985"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.529985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.533156"], ["slug", "surname-0042"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 13:24:14.533156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.534528"], ["group_id", 1708], ["leader", "t"], ["person_id", 2029], ["updated_at", "2014-10-13 13:24:14.534528"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.535698' WHERE "people"."id" = 2029 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.536530' WHERE "groups"."id" = 1708  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 1708]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.545588"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.545588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1709]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1709]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1709]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1709"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.550279"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.550279"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1709/1710/%' OR "groups"."ancestry" = '1709/1710')) SQL (0.3ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1710]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1710]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.560639"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.560639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1711]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1711]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1711]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1711"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.565334"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.565334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1711/1712/%' OR "groups"."ancestry" = '1711/1712'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:14.574363"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:14.574363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:14.584974"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:14.584974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:14.595712"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:14.595712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:14.608225"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:14.608225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:14.619169"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:14.619169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.639985"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.639985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.653435"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.653435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.676752"], ["slug", "surname-0043"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 13:24:14.676752"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 2035 [["updated_at", "2014-10-13 13:24:14.678251"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.681550"], ["slug", "surname-0044"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 13:24:14.681550"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.684679"], ["slug", "surname-0045"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 13:24:14.684679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.688444"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 13:24:14.688444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.694033"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.694033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2038]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.701774"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 13:24:14.701774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.707819"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.707819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2039]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.717268"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 13:24:14.717268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2040]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.725235"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 13:24:14.725235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2041]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:14.737756"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:14.737756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2042]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2042) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.785768"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:14.785768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 28.0ms | ActiveRecord: 0.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2043]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.5ms | ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2042]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:14.897478"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:14.897478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2044]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2044]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2044]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2044) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 36.5ms | ActiveRecord: 1.6ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.952328"], ["slug", "surname-0050"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 13:24:14.952328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:14.959351"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.959351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1717]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1717]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1717]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1717"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:14.964118"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:14.964118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:14.965481"], ["group_id", 1718], ["person_id", 2045], ["updated_at", "2014-10-13 13:24:14.965481"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:14.966180' WHERE "people"."id" = 2045 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:14.966820' WHERE "groups"."id" = 1718  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0050/edit" for 127.0.0.1 at 2014-10-13 14:24:14 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0050"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2044]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0050' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2045) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1717, 1718) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1717, 1718) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2045]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.8ms | ActiveRecord: 1.5ms) Started DELETE "/people/surname-0050" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0050"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2044]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0050' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2045) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 347]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2045]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:15.021580' WHERE "people"."id" = 2045 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:15.022330' WHERE "groups"."id" = 1718 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2045]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2044]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 347]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2045]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:15.046068"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:15.046068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1719]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1719]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1719]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1719"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:15.050855"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:15.050855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:15.053497"], ["slug", "surname-0051"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 13:24:15.053497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:15.491313"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:15.491313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2047]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2047) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.3ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0051/edit" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2046) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0051" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0051", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1719", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2046) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0051' AND "people"."given_name" = '' AND ("people"."id" != 2046) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 2046 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:24:15.809886"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:15.810982"], ["group_id", 1719], ["person_id", 2046], ["role", ""], ["updated_at", "2014-10-13 13:24:15.810982"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2046]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:15.812481' WHERE "people"."id" = 2046 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1719]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:15.813855' WHERE "groups"."id" = 1719  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/surname-0051 Completed 302 Found in 14ms (ActiveRecord: 2.8ms) Started GET "/people/surname-0051" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2046) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0051/edit" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0051"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2046) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1719) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2046]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (8.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 53ms (Views: 46.0ms | ActiveRecord: 2.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:15 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:16.036209"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:16.036209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2048]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2048) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:16.087921"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:16.087921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1721]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1721]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1721]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1721"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:16.093689"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:16.093689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:16.096592"], ["slug", "surname-0052"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 13:24:16.096592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:16.099077"], ["group_id", 1722], ["person_id", 2049], ["updated_at", "2014-10-13 13:24:16.099077"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2049]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:16.100513' WHERE "people"."id" = 2049 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:16.101229' WHERE "groups"."id" = 1722  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0052" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0052"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0052' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2049) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1721, 1722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1721, 1722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.3ms) Started GET "/people/surname-0052/reported_profiles/new" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0052"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0052' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 13.7ms | ActiveRecord: 0.7ms) Started POST "/people/surname-0052/reported_profiles" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0052"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0052' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2049]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 2048], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.173@digital.justice.gov.uk"], ["subject_id", 2049]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 10.4ms Sent mail to example.user.173@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:24:16 +0100 From: support@example.com To: example.user.173@digital.justice.gov.uk Message-ID: <543bd280281b7_fc4b3fcef0865bec34085@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0052 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0052 Redirected to http://www.example.com/people/surname-0052 Completed 302 Found in 23ms (ActiveRecord: 1.3ms) Started GET "/people/surname-0052" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0052"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2048]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0052' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2049) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1721, 1722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1721, 1722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (11.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (12.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 22.6ms | ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:16.210290"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:16.210290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2050]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2050]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2050]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2050) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0053' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:16.255080"], ["slug", "surname-0053"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 13:24:16.255080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0053/edit" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2050]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2051) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:16.306267"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:16.306267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2052]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2052]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2052]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2052) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:16.354073"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:16.354073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2052]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2053) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.0ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2052]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2053) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2052]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2053) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 39.2ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:16.484095"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:16.484095"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2054]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2054]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2054]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2054) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2054]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2054]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 25.6ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:16.615877"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:16.615877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1723]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1723]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1723]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1723"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:16.620763"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:16.620763"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:17.057358"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:17.057358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2055]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2055) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 29.8ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1724", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:24:17.393981"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:17.393981"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:17.395381"], ["group_id", 1724], ["person_id", 2056], ["role", ""], ["updated_at", "2014-10-13 13:24:17.395381"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2056]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:17.396860' WHERE "people"."id" = 2056 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1724]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:17.398246' WHERE "groups"."id" = 1724  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/marco-polo/image/edit Completed 302 Found in 19ms (ActiveRecord: 2.0ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64637/people/marco-polo?cache_bust=1413206657 Completed 302 Found in 8ms (ActiveRecord: 0.6ms) Started GET "/people/marco-polo?cache_bust=1413206657" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206657", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2055]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2056) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1723, 1724) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1723, 1724) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:17.608408"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:17.608408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2057]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2057) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:24:17.714249"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:17.714249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2058) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 8.4ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2057]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2058) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.2ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:17.803555"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:17.803555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2059]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2059) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 33.0ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:17.904451"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:17.904451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 12ms (ActiveRecord: 1.1ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.1ms | ActiveRecord: 0.5ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2060) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2059]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2060) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.3ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:17 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:18.004555"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:18.004555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2061]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2061) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.7ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:24:18.051122"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:18.051122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2062) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2062) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2062) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 2062) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2062 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:18.130034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 13ms (ActiveRecord: 1.9ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2061]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2062) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:18.168986"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:18.168986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2063]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2063) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:18.219153"], ["slug", "surname-0054"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 13:24:18.219153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0054/edit" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2064) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0054" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2064) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2064]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2063]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2064]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:18.305494"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:18.305494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2065]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2065) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:18.350850"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:18.350850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:18.353378"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:24:18.353378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2067) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2067) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 2067) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2066]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 1.7ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2067) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2067 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:18.440370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2065]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2067) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:18.470510"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:18.470510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2068]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2068]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2068]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2068) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 42.9ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2068]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 35.3ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:18.582680"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:18.582680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1725]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1725]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1725]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1725"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:18.586955"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:18.586955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:18.592208"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:18.592208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 9.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:19.048880"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:19.048880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2070]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2070) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1726", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2069]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 9.9ms | ActiveRecord: 1.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1726"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413206659-64587-0618/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:24:19.459658"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:19.459658"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:19.460724"], ["group_id", 1726], ["person_id", 2071], ["role", ""], ["updated_at", "2014-10-13 13:24:19.460724"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2071]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:19.462122' WHERE "people"."id" = 2071 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1726]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:19.463691' WHERE "groups"."id" = 1726  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/people/marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543/image/edit Completed 302 Found in 16ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543/image/edit" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 6.9ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543/image" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64637/people/marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543?cache_bust=1413206659 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) Started GET "/people/marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543?cache_bust=1413206659" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206659", "id"=>"marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2070]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-f41cd86f-8ddf-4580-a696-a4a319830543' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2071) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1725, 1726) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1725, 1726) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 1.4ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:19.682013"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:19.682013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2072]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2072]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2072]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2072) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 40ms (Views: 35.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:19.730777"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 13:24:19.730777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 2073 [["email", nil], ["updated_at", "2014-10-13 13:24:19.732378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2072]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2073) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:19.759665"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:19.759665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2074]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2074]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2074]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2074) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:19.805304"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 13:24:19.805304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2075]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2075 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:19.810421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:19.821539"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:19.821539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1727]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1727]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1727]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1727"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:19.826890"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:19.826890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:19.829372"], ["group_id", 1728], ["person_id", 2075], ["updated_at", "2014-10-13 13:24:19.829372"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2075]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:19.830832' WHERE "people"."id" = 2075 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:19.831513' WHERE "groups"."id" = 1728  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2074]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2075) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1727, 1728) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1727, 1728) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:19.865757"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:19.865757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2076]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2076) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:19.925704"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 13:24:19.925704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2077) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.0ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.6ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 2077], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:19.975918"], ["updated_at", "2014-10-13 13:24:19.975918"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "39986696-df49-4ef8-a3c4-7768b104fda8"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 12.2ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:24:19 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd283f0b25_fc4b3fcef0865bec34184@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/39986696-df49-4ef8-a3c4-7768b104fda8?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 22ms (ActiveRecord: 1.3ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:24:19 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2076]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2077) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:20.019921"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:20.019921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2078]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2078]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2078]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2078) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 40.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.074024"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-974f9e93-d9da-491c-9c33-3c94ebbb332e"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 13:24:20.074024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-974f9e93-d9da-491c-9c33-3c94ebbb332e" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-974f9e93-d9da-491c-9c33-3c94ebbb332e"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2078]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-974f9e93-d9da-491c-9c33-3c94ebbb332e' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2079) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 16ms (Views: 11.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:20.104188"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:20.104188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2080]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2080]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2080]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2080) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.151680"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-2a5b9203-637e-4a4c-9267-5bfb8e19f262"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 13:24:20.151680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2081]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2081 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:24:20.168783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.178566"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.178566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1729]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1729]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1729]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1729"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.183321"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.183321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.185487"], ["group_id", 1730], ["person_id", 2081], ["updated_at", "2014-10-13 13:24:20.185487"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2081]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.186950' WHERE "people"."id" = 2081 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.187590' WHERE "groups"."id" = 1730  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-2a5b9203-637e-4a4c-9267-5bfb8e19f262" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-2a5b9203-637e-4a4c-9267-5bfb8e19f262"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2080]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-2a5b9203-637e-4a4c-9267-5bfb8e19f262' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2081) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1729, 1730) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1729, 1730) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.212143"], ["slug", "surname-0060"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 13:24:20.212143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.219018"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.219018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1731]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1731]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1731]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1731"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.223623"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.223623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.224993"], ["group_id", 1732], ["person_id", 2082], ["updated_at", "2014-10-13 13:24:20.224993"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.225704' WHERE "people"."id" = 2082 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.226305' WHERE "groups"."id" = 1732  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.236106"], ["slug", "surname-0061"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 13:24:20.236106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.242725"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.242725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1733]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1733]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1733]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1733"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.247575"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.247575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.248953"], ["group_id", 1734], ["person_id", 2083], ["updated_at", "2014-10-13 13:24:20.248953"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.249653' WHERE "people"."id" = 2083 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.250280' WHERE "groups"."id" = 1734  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.259531"], ["slug", "surname-0062"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 13:24:20.259531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.265750"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.265750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1735]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1735]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1735]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0055-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1735"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.271345"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.271345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.272659"], ["group_id", 1736], ["person_id", 2084], ["updated_at", "2014-10-13 13:24:20.272659"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.273453' WHERE "people"."id" = 2084 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.274170' WHERE "groups"."id" = 1736  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0063' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.280814"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0063"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 13:24:20.280814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:20.284888"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 13:24:20.284888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.289302"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 13:24:20.289302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.291783"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 13:24:20.291783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"2088"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2087]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2088' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2088]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2088]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.302966"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 13:24:20.302966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.305597"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 13:24:20.305597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.313180"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.313180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1737]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1737]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1737]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0056-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1737"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.317982"], ["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.317982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.320114"], ["group_id", 1738], ["person_id", 2090], ["updated_at", "2014-10-13 13:24:20.320114"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2090]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.321529' WHERE "people"."id" = 2090 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.322210' WHERE "groups"."id" = 1738  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2090"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2089]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2090' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2090]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2090]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2089], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.189@digital.justice.gov.uk"], ["subject_id", 2090]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.4ms Sent mail to example.user.189@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 14:24:20 +0100 From: support@example.com To: example.user.189@digital.justice.gov.uk Message-ID: <543bd284523e9_fc4b3fcef0865bec34236@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0067 has said that they believe the information on Surname-0068 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.346458"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 13:24:20.346458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.349411"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 13:24:20.349411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.357089"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.357089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1739]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1739]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1739]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0057-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1739"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.361866"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.361866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.363964"], ["group_id", 1740], ["person_id", 2092], ["updated_at", "2014-10-13 13:24:20.363964"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2092]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.365448' WHERE "people"."id" = 2092 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.366142' WHERE "groups"."id" = 1740  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2092"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2091]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2092]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2092]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2091], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.191@digital.justice.gov.uk"], ["subject_id", 2092]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.6ms Sent mail to example.user.191@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:24:20 +0100 From: support@example.com To: example.user.191@digital.justice.gov.uk Message-ID: <543bd2845c9ff_fc4b3fcef0865bec34377@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0069 has said that they believe the information on Surname-0070 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2092]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.388970"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 13:24:20.388970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.391926"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 13:24:20.391926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.399204"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.399204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1741]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1741]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1741]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1741"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.403834"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.403834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.406070"], ["group_id", 1742], ["person_id", 2094], ["updated_at", "2014-10-13 13:24:20.406070"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2094]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.407668' WHERE "people"."id" = 2094 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.408375' WHERE "groups"."id" = 1742  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2094"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2093]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2094]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2094]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2093], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.193@digital.justice.gov.uk"], ["subject_id", 2094]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.8ms Sent mail to example.user.193@digital.justice.gov.uk (7.0ms) Date: Mon, 13 Oct 2014 14:24:20 +0100 From: support@example.com To: example.user.193@digital.justice.gov.uk Message-ID: <543bd28467002_fc4b3fcef0865bec34475@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0071 has said that they believe the information on Surname-0072 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 19ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.433739"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 13:24:20.433739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.436691"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 13:24:20.436691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.443632"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.443632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1743]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1743]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1743]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1743"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.448843"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.448843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.451277"], ["group_id", 1744], ["person_id", 2096], ["updated_at", "2014-10-13 13:24:20.451277"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2096]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.453123' WHERE "people"."id" = 2096 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.453817' WHERE "groups"."id" = 1744  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2096"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2095]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2096' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2096]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2096]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2095], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.195@digital.justice.gov.uk"], ["subject_id", 2096]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.9ms Sent mail to example.user.195@digital.justice.gov.uk (19.2ms) Date: Mon, 13 Oct 2014 14:24:20 +0100 From: support@example.com To: example.user.195@digital.justice.gov.uk Message-ID: <543bd28472276_fc4b3fcef0865bec34530@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0073 has said that they believe the information on Surname-0074 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 31ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.491323"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 13:24:20.491323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.493775"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 13:24:20.493775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.500348"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.500348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1745]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1745]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1745]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1745"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.504804"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.504804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:20.506879"], ["group_id", 1746], ["person_id", 2098], ["updated_at", "2014-10-13 13:24:20.506879"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2098]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:20.508305' WHERE "people"."id" = 2098 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:20.508952' WHERE "groups"."id" = 1746  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2098"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2097]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2098' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2098]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2098]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2097], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.197@digital.justice.gov.uk"], ["subject_id", 2098]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.4ms Sent mail to example.user.197@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:24:20 +0100 From: support@example.com To: example.user.197@digital.justice.gov.uk Message-ID: <543bd2847f669_fc4b3fcef0865bec3468a@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0075 has said that they believe the information on Surname-0076 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 16ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.530566"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 13:24:20.530566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.532970"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 13:24:20.532970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2100"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2099]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2100' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2100]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.541958"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 13:24:20.541958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.547145"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 13:24:20.547145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2102"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2101]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2102' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2102]] Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.560064"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 13:24:20.560064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.563523"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 13:24:20.563523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2104"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2103]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2104' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2104]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:20.628268"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:20.628268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2105]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2105]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2105]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2105) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.695029"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.695029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1747]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1747]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1747]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1747"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.699668"], ["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.699668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0061" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0061"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:20.720393"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:20.720393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0061 Completed 302 Found in 6ms (ActiveRecord: 0.9ms) Started GET "/teams/group-0061" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2106]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0061' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1748) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1747, 1748) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1748]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1747/1748' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1747/1748' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1748]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 22.9ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:20.764380"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.764380"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1749]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1749]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1749]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1749"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:20.768928"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:20.768928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:21.195988"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:21.195988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2107]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2107) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.1ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1750", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1750]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1750]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1750]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1750]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1749/1750"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:21.431949"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:24:21.431949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2107]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1751) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1749, 1750, 1751) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1751]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1749/1750/1751' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1749/1750/1751' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1751]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.8ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:21.536530"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:21.536530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2108]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2108]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2108]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2108) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:21.588090"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.588090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1752]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1752]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1752]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1752"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:21.593164"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.593164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1752]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2108]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1752) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1752) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1752' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1752' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:21.636956"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:21.636956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2109]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2109]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2109]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2109) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.2ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2109]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:21.711997"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:21.711997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2110]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2110]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2110]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2110) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:21.760659"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.760659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1754"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:21.765928"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.765928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0063/edit" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0063"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2110]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0063' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1755) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1754, 1755) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1754]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1754) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1754/1755' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.2ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:21.805702"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.805702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1756"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:21.811008"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.811008"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1756/1757"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:21.816069"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:21.816069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:21 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:22.248891"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:22.248891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2111]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2111) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.3ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1758) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1756, 1757, 1758) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1758]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1756/1757/1758' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1756/1757/1758' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1758]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1758) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1756, 1757, 1758) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1757]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1756, 1757) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1756/1757/1758' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.3ms | ActiveRecord: 2.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1756", "team_email_address"=>"example.user.209@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1758) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1758) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1758) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1756/1757/1758/%' OR "groups"."ancestry" = '1756/1757/1758')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 1758 [["ancestry", "1756"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 13:24:22.597160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/teams/cyberdigital-cyberservices Completed 302 Found in 11ms (ActiveRecord: 2.6ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2111]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1758) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1756, 1758) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1758]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1756/1758' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1756/1758' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1758]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1758]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1756]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:22.688447"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:22.688447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2112]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2112) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:22.757273"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:24:22.757273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1759) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1759) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1759]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1759' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1759' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1759]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 2.0ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2112]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1759) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1759) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '1759' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1759' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.5ms | ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:22.812250"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:22.812250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2113]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2113]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2113) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.5ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2113]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2113]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:24:22.877540"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:24:22.877540"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2113]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1760) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1760) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1760]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1760' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1760' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1760]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:22.911525"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:22.911525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:23.336413"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:23.336413"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2114]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2114) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1761) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1761) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1761]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1761' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1761' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1761]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.6ms | ActiveRecord: 2.2ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.1ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"1761", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1761]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1761]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1761]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1761]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1761"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:23.598553"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:24:23.598553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/teams/csg Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1762) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1761, 1762) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1762]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1761/1762' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1761/1762' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1762]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 1.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1761]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:23.688268"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:23.688268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1763]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1763]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1763]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1763"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:23.693717"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:23.693717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1763/1764"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:23.698486"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:23.698486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64637/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:23 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:24.122973"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:24.122973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2115]] Redirected to http://127.0.0.1:64637/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2115) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 28.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1765) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1763, 1764, 1765) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1765]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1763/1764/1765' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1763/1764/1765' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1765]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1765) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1763, 1764, 1765) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1763, 1764) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (20.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1763/1764/1765' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.3ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"1764", "team_email_address"=>"example.user.213@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1765) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1765) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 1765) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1765 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 13:24:24.495219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64637/teams/cyberdigital-cyberservices Completed 302 Found in 49ms (ActiveRecord: 2.9ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2115]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1765) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1763, 1764, 1765) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1765]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1763/1764/1765' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1763/1764/1765' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1765]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1765]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1764]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:24.584664"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:24.584664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2116]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2116]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2116]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:24.629553"], ["slug", "surname-0083"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 13:24:24.629553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.635972"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.635972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0064' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1766"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.640581"], ["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.640581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:24.641939"], ["group_id", 1767], ["person_id", 2117], ["updated_at", "2014-10-13 13:24:24.641939"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:24.642580' WHERE "people"."id" = 2117 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:24.643226' WHERE "groups"."id" = 1767  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0064/edit" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0064"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2116]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0064' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1767) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1766, 1767) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1766]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1766) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1766/1767' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.2ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:24.679494"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:24.679494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2118]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2118]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2118]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2118) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.727910"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.727910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1768"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.732543"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.732543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0065/edit" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0065"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2118]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1769) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1768, 1769) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1768) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1768/1769' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 17.1ms | ActiveRecord: 2.0ms) Started DELETE "/teams/group-0065" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0065"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2118]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1769) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1768]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1768/1769/%' OR "groups"."ancestry" = '1768/1769')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1768/1769' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1769]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2118]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1768) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1768) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1768]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1768' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1768' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1768]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1769]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:24.800554"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:24.800554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2119]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2119) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.5ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.845813"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.845813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1770]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1770]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1770]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1770"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.851061"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.851061"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1771) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1770, 1771) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1771]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1770/1771' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1770/1771' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1771]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 2.1ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (5.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 9.7ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"1771", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1771]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1771]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1771]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1771]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "1770/1771"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:24.897715"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 13:24:24.897715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 14:24:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1772) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1770, 1771, 1772) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1772]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1770/1771/1772' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1770/1771/1772' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1772]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1771]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.926719"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.926719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1773]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1773]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1773]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1773"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.931102"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.931102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1773/1774"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:24.935700"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.935700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1773/1774/1775"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:24.940180"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.940180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1775]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1773/1774/1775"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:24.944676"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.944676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1773/1774"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:24.949164"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.949164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.958534"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.958534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1779]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1779]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1779]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1779"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.962878"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.962878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1779/1780"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:24.967447"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.967447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1779/1780/1781"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:24.971922"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.971922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1781]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1779/1780/1781"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:24.976812"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.976812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1780]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1779/1780"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:24.981505"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.981505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1780 OR "groups"."ancestry" ILIKE '1779/1780/%') OR "groups"."ancestry" = '1779/1780')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:24.991685"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.991685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1785]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1785]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1785]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1785"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:24.995869"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:24.995869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1785/1786"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:25.000360"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.000360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1785/1786/1787"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:25.005046"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.005046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1787]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1785/1786/1787"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:24:25.009574"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.009574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1786]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1785/1786"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:25.014043"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.014043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1786 OR "groups"."ancestry" ILIKE '1785/1786/%') OR "groups"."ancestry" = '1785/1786')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:25.023151"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:25.023151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2120]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2120]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2120]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2120) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.070963"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.070963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1791"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.076585"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.076585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1792]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1792]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1792]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1791/1792"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:25.081894"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.081894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1791]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1791"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.087554"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.087554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1794]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1794]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1794]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1791/1794"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:24:25.092639"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.092639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.095099"], ["slug", "surname-0084"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 13:24:25.095099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.096607"], ["group_id", 1793], ["person_id", 2121], ["updated_at", "2014-10-13 13:24:25.096607"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:25.097249' WHERE "people"."id" = 2121 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:25.097849' WHERE "groups"."id" = 1793  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.099059"], ["group_id", 1795], ["person_id", 2121], ["updated_at", "2014-10-13 13:24:25.099059"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:25.099648' WHERE "people"."id" = 2121 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:25.100176' WHERE "groups"."id" = 1795  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2120]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1795) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1791, 1794, 1795) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1795]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1791/1794/1795' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1791/1794/1795' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1795]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 2.0ms) Started GET "/people/surname-0084" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0084"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2120]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0084' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2121) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1795]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1791, 1792, 1793) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1791, 1794, 1795) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1791, 1792, 1793) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1791, 1794, 1795) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:25.150274"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:25.150274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2122]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2122]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2122]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2122) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.8ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:25.191329"], ["slug", "surname-0085"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 13:24:25.191329"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0085" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0085"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2122]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0085' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2123) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:25.216476"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:25.216476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2124]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2124]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2124]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2124) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 35ms (Views: 29.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.261518"], ["slug", "surname-0086"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 13:24:25.261518"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0086" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0086"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2124]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0086' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2125) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.5ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:25.288700"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:25.288700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2126]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2126]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2126]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2126]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 46.4ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2126]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2126) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2126]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2126]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:25 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.1ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.429964"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 13:24:25.429964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.440397"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 13:24:25.440397"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"2128"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2128' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2128]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.466165"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 13:24:25.466165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.468609"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 13:24:25.468609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2130"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2129]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2130' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2130]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2130], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.477220"], ["updated_at", "2014-10-13 13:24:25.477220"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "39ac9373-a5df-4f43-bf42-15339d9aa1f2"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.3ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:24:25 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd28976333_fc4b3fcef0865bec34787@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/39ac9373-a5df-4f43-bf42-15339d9aa1f2?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 19ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.492651"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 13:24:25.492651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.495154"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 13:24:25.495154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2132"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2131]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2132' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2132]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2132], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.503434"], ["updated_at", "2014-10-13 13:24:25.503434"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "d5329f7f-8c8e-46ef-81aa-46bb53e585a9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.2ms Sent mail to someone.else@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:24:25 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd2897ca42_fc4b3fcef0865bec34888@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/d5329f7f-8c8e-46ef-81aa-46bb53e585a9?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.519320"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 13:24:25.519320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.521999"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 13:24:25.521999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2134"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2133]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2134]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.530721"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 13:24:25.530721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.533355"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 13:24:25.533355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2136"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2135]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2136' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2136]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.541506"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 13:24:25.541506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.544059"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 13:24:25.544059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2138"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2137]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2138' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2138]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.552536"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 13:24:25.552536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0100' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.555025"], ["slug", "surname-0100"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 13:24:25.555025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0100"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2139]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0100' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2140) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.568543"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.568543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1796]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1796]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1796]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1796"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.573382"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.573382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.578189"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 13:24:25.578189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0102' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.580738"], ["slug", "surname-0102"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 13:24:25.580738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0102"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2141]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0102' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2142) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.591481"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 13:24:25.591481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2143]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.600674"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.600674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1798]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1798]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1798]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0067-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0067' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1798"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.605272"], ["name", "Group-0067"], ["slug", "group-0067"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.605272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.609633"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 13:24:25.609633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2144]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.616336"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 13:24:25.616336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0106' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.619633"], ["slug", "surname-0106"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 13:24:25.619633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0107", "image"=>"#"}, "id"=>"surname-0106"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2145]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0106' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2146) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0107' AND "people"."given_name" IS NULL AND ("people"."id" != 2146) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2146]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2146 [["image", nil], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 13:24:25.628987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0106/image/edit Completed 302 Found in 9ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.635090"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 13:24:25.635090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.637722"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:24:25.637722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.640501"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:24:25.640501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2147]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2149) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 2149) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.655515"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 13:24:25.655515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0110' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.659554"], ["slug", "surname-0110"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 13:24:25.659554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0111", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0110"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2150]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2151) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0111' AND "people"."given_name" IS NULL AND ("people"."id" != 2151) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2151 [["surname", "Surname-0111"], ["updated_at", "2014-10-13 13:24:25.668940"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0110 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.674212"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 13:24:25.674212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0113' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.677746"], ["slug", "surname-0113"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 13:24:25.677746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0114", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0113"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2152]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0113' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2153) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0114' AND "people"."given_name" IS NULL AND ("people"."id" != 2153) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2153 [["surname", "Surname-0114"], ["updated_at", "2014-10-13 13:24:25.686292"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0113 Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2153]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.692562"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 13:24:25.692562"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0116' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.695732"], ["slug", "surname-0116"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 13:24:25.695732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0117", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0116"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2154]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2155) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0117' AND "people"."given_name" IS NULL AND ("people"."id" != 2155) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2155 [["surname", "Surname-0117"], ["updated_at", "2014-10-13 13:24:25.706660"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0116 Completed 302 Found in 11ms (ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.713636"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 13:24:25.713636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0119' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.717102"], ["slug", "surname-0119"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 13:24:25.717102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2156]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2157) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.728580"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 13:24:25.728580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0121' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.732040"], ["slug", "surname-0121"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 13:24:25.732040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0121"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2158]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0121' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2159) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.743561"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 13:24:25.743561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0123' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.747130"], ["slug", "surname-0123"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 13:24:25.747130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0123"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2160]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0123' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2161) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.758533"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 13:24:25.758533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0125' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.762115"], ["slug", "surname-0125"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 13:24:25.762115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0125"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2162]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0125' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2163) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.776653"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.776653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1800]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1800]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1800]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0068-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0068' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0068' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1800"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.781426"], ["name", "Group-0068"], ["slug", "group-0068"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.781426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.786270"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 13:24:25.786270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2164]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.792150"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 13:24:25.792150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.795460"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 13:24:25.795460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0128"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2165]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0128' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2166) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.807822"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.807822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1802]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1802]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1802]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0069-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0069' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1802"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.812104"], ["name", "Group-0069"], ["slug", "group-0069"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.812104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.816172"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 13:24:25.816172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0130' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.819382"], ["slug", "surname-0130"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 13:24:25.819382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0130"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2167]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0130' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2168) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.829354"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 13:24:25.829354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0132' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.832246"], ["slug", "surname-0132"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 13:24:25.832246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.838199"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.838199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1804]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1804]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1804]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0070-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0070' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1804"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:25.842416"], ["name", "Group-0070"], ["slug", "group-0070"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:25.842416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.843904"], ["group_id", 1805], ["person_id", 2170], ["updated_at", "2014-10-13 13:24:25.843904"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2170]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:25.845256' WHERE "people"."id" = 2170 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:25.845928' WHERE "groups"."id" = 1805  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0132"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2169]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0132' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2170) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.855767"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 13:24:25.855767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0134' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.858787"], ["slug", "surname-0134"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 13:24:25.858787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0134"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2171]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2172) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.868643"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 13:24:25.868643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0136' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.871708"], ["slug", "surname-0136"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 13:24:25.871708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0136"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2173]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0136' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2174) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.881230"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 13:24:25.881230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0138' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.884213"], ["slug", "surname-0138"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 13:24:25.884213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0138"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2175]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0138' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2176) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2176]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.893803"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 13:24:25.893803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0140' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.896924"], ["slug", "surname-0140"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 13:24:25.896924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0140"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2177]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0140' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2178) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2178]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.908089"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 13:24:25.908089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0142' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.911857"], ["slug", "surname-0142"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 13:24:25.911857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0142"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2179]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0142' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2180) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2180]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.921439"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 13:24:25.921439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0144", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2181]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0144' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0144' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.927969"], ["image", nil], ["slug", "surname-0144"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 13:24:25.927969"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0144/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.933801"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 13:24:25.933801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.936266"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:24:25.936266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2183]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.944735"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 13:24:25.944735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0147"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2185]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0147' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0147' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.950409"], ["slug", "surname-0147"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 13:24:25.950409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0147 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.955111"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 13:24:25.955111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0149"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2187]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0149' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0149' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.961360"], ["slug", "surname-0149"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 13:24:25.961360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0149 Completed 302 Found in 5ms (ActiveRecord: 1.1ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.966429"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 13:24:25.966429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0151"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2189]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0151' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0151' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:25.972146"], ["slug", "surname-0151"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 13:24:25.972146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0151 Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.977988"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 13:24:25.977988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2191]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.985696"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 13:24:25.985696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2192]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:25.993582"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 13:24:25.993582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2193]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.001419"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 13:24:26.001419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2194]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.011592"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:26.011592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1806]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1806]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1806]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0071-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1806"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:26.018157"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:26.018157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.023147"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 13:24:26.023147"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2195]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.030785"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 13:24:26.030785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2196]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.037621"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 13:24:26.037621"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2197]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.046821"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:26.046821"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1808]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1808]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1808]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0072-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1808"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:26.051227"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:26.051227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.056735"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:24:26.056735"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.059234"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:24:26.059234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2199], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2198]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 3.9ms Sent mail to recipient@example.com (4.3ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd28a101ae_fc4b3fcef0865bec34953@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.073747"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:24:26.073747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.076683"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:24:26.076683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2201], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2200]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.0ms Sent mail to recipient@example.com (4.9ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd28a14736_fc4b3fcef0865bec35031@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.092920"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:24:26.092920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.095549"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:24:26.095549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2203], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2202]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 3.8ms Sent mail to recipient@example.com (4.1ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd28a18e40_fc4b3fcef0865bec3512f@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.109739"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:24:26.109739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.114421"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:24:26.114421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2205], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2204]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.4ms Sent mail to recipient@example.com (6.4ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd28a1defc_fc4b3fcef0865bec35262@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.132793"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:24:26.132793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.135761"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:24:26.135761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2207], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2206]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.6ms Sent mail to recipient@example.com (5.1ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd28a2355c_fc4b3fcef0865bec353db@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.152707"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 13:24:26.152707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.156770"], ["updated_at", "2014-10-13 13:24:26.156770"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "b1887650-02c4-42de-a1bc-2e52f817ca49"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2208]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 15.7ms Sent mail to test.user@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28a2995b_fc4b3fcef0865bec354a8@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/b1887650-02c4-42de-a1bc-2e52f817ca49?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.7ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.182093"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 13:24:26.182093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.185460"], ["updated_at", "2014-10-13 13:24:26.185460"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "0bcfae78-1551-43ef-8587-ee74795d0f83"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2209]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.0ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28a2f645_fc4b3fcef0865bec35569@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/0bcfae78-1551-43ef-8587-ee74795d0f83?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.201725"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 13:24:26.201725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.205889"], ["updated_at", "2014-10-13 13:24:26.205889"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "4e6af476-fdd4-4085-becc-dd39bbed2504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2210]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 12.0ms Sent mail to test.user@digital.justice.gov.uk (8.6ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28a34bde_fc4b3fcef0865bec3565c@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/4e6af476-fdd4-4085-becc-dd39bbed2504?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.227309"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 13:24:26.227309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.230605"], ["updated_at", "2014-10-13 13:24:26.230605"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "aa4280d1-ddf0-44c6-9d2d-f47bcb6fe9b6"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2211]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 8.5ms Sent mail to test.user@digital.justice.gov.uk (5.6ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28a39f40_fc4b3fcef0865bec35785@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/aa4280d1-ddf0-44c6-9d2d-f47bcb6fe9b6?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.247889"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 13:24:26.247889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:26.251546"], ["updated_at", "2014-10-13 13:24:26.251546"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "09735a6f-fc41-4809-80a2-72014b4e2634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2212]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 9.5ms Sent mail to test.user@digital.justice.gov.uk (6.0ms) Date: Mon, 13 Oct 2014 14:24:26 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28a3f788_fc4b3fcef0865bec358b5@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/09735a6f-fc41-4809-80a2-72014b4e2634?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0164' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:26.555832"], ["image", "placeholder.png"], ["slug", "surname-0164"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 13:24:26.555832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0165' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.327934"], ["image", "placeholder.png"], ["slug", "surname-0165"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 13:24:27.327934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.429107"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 13:24:27.429107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2215]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.439826"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 13:24:27.439826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2216]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.449360"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 13:24:27.449360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2217]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.456392"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 13:24:27.456392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.460220"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 13:24:27.460220"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.462656"], ["event", "create"], ["item_id", 2219], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2219]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2219]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.467363"], ["event", "destroy"], ["item_id", 2219], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2219\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 13:24:27.460220000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2219], ["item_type", "Peoplefinder::Person"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"188"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2218]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 188]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2219]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2219) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.460220"], ["id", 2219], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 13:24:27.478472"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:27.480553"], ["event", "create"], ["item_id", 2219], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.486443"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 13:24:27.486443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0171' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.489806"], ["slug", "surname-0171"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 13:24:27.489806"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.493542"], ["event", "create"], ["item_id", 2221], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0171\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.502337"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.502337"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.504117"], ["event", "create"], ["item_id", 1810], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.258@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1810]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1810]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1810]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0073' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1810"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.508813"], ["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.508813"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.510674"], ["event", "create"], ["item_id", 1811], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0073\nteam_email_address:\n- \n- example.user.257@digital.justice.gov.uk\nancestry:\n- \n- '1810'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.511838"], ["group_id", 1811], ["person_id", 2221], ["updated_at", "2014-10-13 13:24:27.511838"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.513214"], ["event", "create"], ["item_id", 366], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 2221\ngroup_id:\n- \n- 1811\n"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:27.513840' WHERE "people"."id" = 2221 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:27.514459' WHERE "groups"."id" = 1811  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 366]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.516314"], ["event", "destroy"], ["item_id", 366], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 366\ngroup_id: 1811\nperson_id: 2221\nrole: \ncreated_at: &1 2014-10-13 13:24:27.511838000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 366], ["item_type", "Peoplefinder::Membership"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:27.517846' WHERE "people"."id" = 2221 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:27.518499' WHERE "groups"."id" = 1811  (0.2ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.6ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"194"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2220]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 194]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 366]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.529995"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 13:24:27.529995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0173' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.532365"], ["slug", "surname-0173"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 13:24:27.532365"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.533893"], ["event", "create"], ["item_id", 2223], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0173\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"195"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2222]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 195]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2223]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2223]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2223]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:27.542193"], ["event", "destroy"], ["item_id", 2223], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2223\ngiven_name: \nsurname: Surname-0173\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:24:27.532365000 Z\nupdated_at: 2014-10-13 13:24:27.532365000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0172"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2223], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2223]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.550934"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 13:24:27.550934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0175' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.553701"], ["slug", "surname-0175"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 13:24:27.553701"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.555269"], ["event", "create"], ["item_id", 2225], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0175\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.564849"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.564849"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.589424"], ["event", "create"], ["item_id", 1812], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.260@digital.justice.gov.uk\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1812]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1812]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1812]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1812"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.597827"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.597827"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.600368"], ["event", "create"], ["item_id", 1813], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0074\nteam_email_address:\n- \n- example.user.259@digital.justice.gov.uk\nancestry:\n- \n- '1812'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.601799"], ["group_id", 1813], ["person_id", 2225], ["updated_at", "2014-10-13 13:24:27.601799"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.603530"], ["event", "create"], ["item_id", 367], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 2225\ngroup_id:\n- \n- 1813\n"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:27.604270' WHERE "people"."id" = 2225 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:27.604907' WHERE "groups"."id" = 1813  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"200"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2224]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 200]] Redirected to http://test.host/audit_trail Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 367]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.622124"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.622124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:27.632436"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:24:27.632436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2226]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2226]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2226]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (54.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 71ms (Views: 65.8ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2226]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.732750"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.732750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1815]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1815]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1815]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1815"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.737438"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.737438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.8ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.775686"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.775686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1817]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1817]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1817]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1817"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.780959"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.780959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.785789"], ["updated_at", "2014-10-13 13:24:27.785789"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "4a1a9383-b8aa-440d-96d5-b89f881170ba"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/4a1a9383-b8aa-440d-96d5-b89f881170ba" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"4a1a9383-b8aa-440d-96d5-b89f881170ba"} Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '4a1a9383-b8aa-440d-96d5-b89f881170ba' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:27.793529"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 13:24:27.793529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2227]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2227]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2227]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2227) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.9ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.873585"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.873585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1819]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1819]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1819]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0077-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1819"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.879471"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.879471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:27.884314"], ["updated_at", "2014-10-13 13:24:27.884314"], ["user_email", "example.user.268@digital.justice.gov.uk"], ["value", "0ead522e-3dbc-4b78-bc7e-bd9d03c26b3b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/0ead522e-3dbc-4b78-bc7e-bd9d03c26b3b" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"0ead522e-3dbc-4b78-bc7e-bd9d03c26b3b"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '0ead522e-3dbc-4b78-bc7e-bd9d03c26b3b' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.268@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-268' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:24:27.891886"], ["email", "example.user.268@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-268"], ["surname", "user"], ["updated_at", "2014-10-13 13:24:27.891886"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2228]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2228]] Redirected to http://www.example.com/people/example-user-268/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/example-user-268/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-268"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2228]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-268' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2228) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.950302"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.950302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1821]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1821]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1821]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1821"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.955130"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.955130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:24:27 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.990027"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.990027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1823]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1823]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1823]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1823"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:27.995405"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:27.995405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:27.998353"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 13:24:27.998353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.002865"], ["updated_at", "2014-10-13 13:24:28.002865"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "a277a357-0555-4455-a7c2-4f587a45f391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2229]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 11.2ms Sent mail to test.user@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 14:24:28 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd28c2e37_fc4b3fcef0865bec359e0@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/a277a357-0555-4455-a7c2-4f587a45f391?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/a277a357-0555-4455-a7c2-4f587a45f391?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"a277a357-0555-4455-a7c2-4f587a45f391"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'a277a357-0555-4455-a7c2-4f587a45f391' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.6ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2229]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2229) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.076027"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.076027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1825]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1825]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1825]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1825"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:28.080761"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.080761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.083383"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:24:28.083383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.086808"], ["updated_at", "2014-10-13 13:24:28.086808"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "9e9b8c54-d3f5-43d7-9b9b-8b015a64e2dc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/9e9b8c54-d3f5-43d7-9b9b-8b015a64e2dc" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"9e9b8c54-d3f5-43d7-9b9b-8b015a64e2dc"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '9e9b8c54-d3f5-43d7-9b9b-8b015a64e2dc' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2230]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 5ms (ActiveRecord: 0.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2230]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2230) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.5ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.140626"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.140626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1827]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1827]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1827]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0081-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1827"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:28.145219"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.145219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:24:28 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.161846"], ["updated_at", "2014-10-13 13:24:28.161846"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "0ccd3179-f3ac-4d05-b7b1-95eb10212e6f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 8.2ms Sent mail to james.darling@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:24:28 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bd28c2ac1c_fc4b3fcef0865bec360d3@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/0ccd3179-f3ac-4d05-b7b1-95eb10212e6f If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 4.7ms | ActiveRecord: 0.4ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.194104"], ["updated_at", "2014-10-13 13:24:28.194104"], ["user_email", "example.user.277@digital.justice.gov.uk"], ["value", "ed0b8cbe-5fd8-4dcd-bc57-cec11ec84a63"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 141]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.203033"], ["updated_at", "2014-10-13 13:24:28.203033"], ["user_email", "example.user.278@digital.justice.gov.uk"], ["value", "d8b1d8ae-36ba-43c9-a8ec-96557cf67230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.209523"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 13:24:28.209523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.212769"], ["updated_at", "2014-10-13 13:24:28.212769"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "6aca8dd4-d9cf-4462-8c24-83118674edc8"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0180' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.224091"], ["slug", "surname-0180"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 13:24:28.224091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2232]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0181' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.228845"], ["slug", "surname-0181"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 13:24:28.228845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.235306"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.235306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1829]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1829]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1829]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1829"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:28.239747"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 13:24:28.239747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.241897"], ["group_id", 1830], ["person_id", 2233], ["updated_at", "2014-10-13 13:24:28.241897"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2233]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:28.243371' WHERE "people"."id" = 2233 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:28.244183' WHERE "groups"."id" = 1830  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2233]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0182' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.248616"], ["slug", "surname-0182"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 13:24:28.248616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.254619"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.254619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1831"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:28.258968"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.258968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1831) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1831 [["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.261828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1831]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1831"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:24:28.266146"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.266146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.268003"], ["group_id", 1833], ["person_id", 2234], ["role", "Cleaner"], ["updated_at", "2014-10-13 13:24:28.268003"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2234]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:28.269358' WHERE "people"."id" = 2234 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:28.269970' WHERE "groups"."id" = 1833  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.271210"], ["group_id", 1832], ["person_id", 2234], ["role", "Designer"], ["updated_at", "2014-10-13 13:24:28.271210"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2234]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:24:28.272451' WHERE "people"."id" = 2234 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:24:28.272995' WHERE "groups"."id" = 1832  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2234]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.278253"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:24:28.278253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2235]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.281793"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 13:24:28.281793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2236]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0184' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.285557"], ["slug", "surname-0184"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 13:24:28.285557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0185' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:24:28.288631"], ["slug", "surname-0185"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 13:24:28.288631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.295640"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.295640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1834) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1834 [["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.298514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.308748"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.308748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1835) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1835 [["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.311589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1835) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1835 [["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.314391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1835) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1835 [["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.317016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.326416"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.326416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1836) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1836 [["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.329865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1836) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1836 [["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.332882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1836) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1836 [["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.335485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:24:28.344869"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.344869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1837) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1837 [["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.347710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1837) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1837 [["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.350514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1837) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1837 [["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.353041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1837) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1837 [["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:24:28.359406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.310944"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 13:28:37.310944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.317076"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 13:28:37.317076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0003", "image"=>"#"}, "id"=>"surname-0002"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2239]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0002' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2240) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0003' AND "people"."given_name" IS NULL AND ("people"."id" != 2240) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2240]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2240 [["image", nil], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 13:28:37.349073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0002/image/edit Completed 302 Found in 31ms (ActiveRecord: 5.7ms)  (0.2ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.356137"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 13:28:37.356137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.359105"], ["slug", "surname-0005"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 13:28:37.359105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0006", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0005"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2241]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0005' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2242) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0006' AND "people"."given_name" IS NULL AND ("people"."id" != 2242) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2242 [["surname", "Surname-0006"], ["updated_at", "2014-10-13 13:28:37.367414"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0005 Completed 302 Found in 8ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.373534"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 13:28:37.373534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.376595"], ["slug", "surname-0008"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 13:28:37.376595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0009", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0008"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2243]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0008' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2244) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0009' AND "people"."given_name" IS NULL AND ("people"."id" != 2244) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2244 [["surname", "Surname-0009"], ["updated_at", "2014-10-13 13:28:37.384535"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0008 Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2244]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.391218"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 13:28:37.391218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.396310"], ["slug", "surname-0011"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 13:28:37.396310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0012", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0011"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2245]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0011' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2246) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0012' AND "people"."given_name" IS NULL AND ("people"."id" != 2246) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2246 [["surname", "Surname-0012"], ["updated_at", "2014-10-13 13:28:37.404661"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0011 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.409795"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 13:28:37.409795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.412087"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:28:37.412087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.414396"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:28:37.414396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2247]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2249) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 2249) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 11ms (Views: 6.2ms | ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.431185"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 13:28:37.431185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.434202"], ["slug", "surname-0015"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 13:28:37.434202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0015"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2250]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0015' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2251) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.447542"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 13:28:37.447542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.451132"], ["slug", "surname-0017"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 13:28:37.451132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0017"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2252]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2253) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.461614"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 13:28:37.461614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0019' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.464617"], ["slug", "surname-0019"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 13:28:37.464617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0019"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2254]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0019' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2255) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.475949"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 13:28:37.475949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0021' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.479274"], ["slug", "surname-0021"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 13:28:37.479274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2256]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0021' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2257) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.497096"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.497096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1838]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1838]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1838]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1838"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.502503"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.502503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.508156"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 13:28:37.508156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.511233"], ["slug", "surname-0023"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 13:28:37.511233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0023"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2258]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0023' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2259) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.525617"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.525617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1840]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1840]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1840]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1840"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.531217"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.531217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.536574"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 13:28:37.536574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0025' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.539938"], ["slug", "surname-0025"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 13:28:37.539938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0025"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2260]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0025' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2261) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.550129"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 13:28:37.550129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.552705"], ["slug", "surname-0027"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 13:28:37.552705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.558819"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.558819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1842]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1842]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1842]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1842"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.562893"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.562893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.566516"], ["group_id", 1843], ["person_id", 2263], ["updated_at", "2014-10-13 13:28:37.566516"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2263]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:37.568732' WHERE "people"."id" = 2263 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:37.569472' WHERE "groups"."id" = 1843  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0027"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2262]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0027' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2263) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.579769"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 13:28:37.579769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0029' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.583220"], ["slug", "surname-0029"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 13:28:37.583220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2265) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.596489"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 13:28:37.596489"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.600889"], ["slug", "surname-0031"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 13:28:37.600889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0031"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2266]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0031' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2267) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.615256"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.615256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1844]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1844]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1844]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1844"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.619833"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.619833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.624099"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 13:28:37.624099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0033' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.626335"], ["slug", "surname-0033"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 13:28:37.626335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0033"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2268]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0033' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2269) ORDER BY groups.name Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.635769"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 13:28:37.635769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2270]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.645000"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.645000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1846]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1846]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1846]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1846"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.649883"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.649883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.654520"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 13:28:37.654520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2271]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.661351"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 13:28:37.661351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0037' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.664480"], ["slug", "surname-0037"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 13:28:37.664480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0037"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2272]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0037' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2273) ORDER BY groups.name Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.674133"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 13:28:37.674133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2274]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.680444"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 13:28:37.680444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0040", "image"=>"#"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2275]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0040' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0040' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.686885"], ["image", nil], ["slug", "surname-0040"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 13:28:37.686885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0040/image/edit Completed 302 Found in 53ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.740555"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 13:28:37.740555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0042"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2277]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0042' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0042' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.747346"], ["slug", "surname-0042"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 13:28:37.747346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0042 Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.755122"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 13:28:37.755122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0044"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2279]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0044' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0044' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.766481"], ["slug", "surname-0044"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 13:28:37.766481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0044 Completed 302 Found in 7ms (ActiveRecord: 1.1ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.773267"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 13:28:37.773267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0046"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2281]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0046' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0046' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.779622"], ["slug", "surname-0046"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 13:28:37.779622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0046 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.785560"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 13:28:37.785560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.788016"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 13:28:37.788016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2283]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.798181"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 13:28:37.798181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2285]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.807303"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 13:28:37.807303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2286]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.815472"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 13:28:37.815472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2287]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.823393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 13:28:37.823393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2288]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.834836"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.834836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1848]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1848]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1848]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1848"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.839582"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.839582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.844886"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 13:28:37.844886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.848536"], ["slug", "surname-0053"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 13:28:37.848536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2289]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2290) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2290]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.860552"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 13:28:37.860552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.864472"], ["slug", "surname-0055"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 13:28:37.864472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0055"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2291]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0055' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2292) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2292]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.876830"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 13:28:37.876830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:37.880680"], ["slug", "surname-0057"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 13:28:37.880680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0057"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2293]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0057' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2294) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2294]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.892196"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 13:28:37.892196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2295]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.900925"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 13:28:37.900925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2296]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.907670"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 13:28:37.907670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2297]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:37.917608"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.917608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1850]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1850]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1850]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1850"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:37.922200"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:37.922200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:37.952108"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:37.952108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2298]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2298) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (11.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (66.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (15.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Completed 200 OK in 152ms (Views: 146.9ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.113645"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:38.113645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2299) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 21ms (Views: 16.4ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2299) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2299) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2299) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2299 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:28:38.197311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2298]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2299) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.225857"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.225857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2300]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2300]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2300]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2300) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:38.271219"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 13:28:38.271219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:38.278587"], ["updated_at", "2014-10-13 13:28:38.278587"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "c4b06878-212f-403d-9677-7b79c2d57d90"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/c4b06878-212f-403d-9677-7b79c2d57d90?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"c4b06878-212f-403d-9677-7b79c2d57d90"} Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'c4b06878-212f-403d-9677-7b79c2d57d90' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 4ms (ActiveRecord: 0.8ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2301]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2301) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.312940"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.312940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2302]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2302]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2302]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2302) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2302]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 33.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2302]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:38.413787"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-e874232a-d2d3-4eea-908a-b611244c300b"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:38.413787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e874232a-d2d3-4eea-908a-b611244c300b Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-e874232a-d2d3-4eea-908a-b611244c300b" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e874232a-d2d3-4eea-908a-b611244c300b"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2302]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e874232a-d2d3-4eea-908a-b611244c300b' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2303) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.438504"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.438504"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2304]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2304]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2304]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2304) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.2ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2304]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2304]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:38.545853"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:38.545853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2304]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2305) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.573141"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.573141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2306]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2306) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:38.619892"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:38.619892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2307) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.9ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2307) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2307) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2307) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 2307 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:28:38.692002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2306]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2307) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.718728"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.718728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2308]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2308) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:38.763500"], ["email", "test.user"], ["slug", "test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 13:28:38.763500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d/edit" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2309) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f2eecb0b-bb24-4d6c-a6f4-003e26e98e7d' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2309) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2309]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2308]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 17.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.854305"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:38.854305"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2310]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2310) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:38.900125"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:38.900125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2311) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.8ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c/edit" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2311) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c" for 127.0.0.1 at 2014-10-13 14:28:38 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2311) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2311) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2311 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:38.972276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:38.984623"], ["updated_at", "2014-10-13 13:28:38.984623"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "da75dd53-ad69-4486-a746-b4334155deba"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 16.3ms Sent mail to bob.smith@digital.justice.gov.uk (7.0ms) Date: Mon, 13 Oct 2014 14:28:38 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd386f3f93_fce23ff024465bf089949@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/da75dd53-ad69-4486-a746-b4334155deba?desired_path=%2Fpeople%2Ftest-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c. Redirected to http://www.example.com/people/test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c Completed 302 Found in 44ms (ActiveRecord: 2.5ms) Started GET "/people/test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2310]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a860b47b-7a0e-49ee-a175-91a28fcdb51c' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2311) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.034841"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.034841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2312]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2312) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.080369"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:39.080369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2313) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2313) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2313) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2313) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2313 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:39.165497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:39.176365"], ["updated_at", "2014-10-13 13:28:39.176365"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3da1e69d-cb2e-495c-87f2-c5b770e9fab2"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 13.5ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:28:39 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd3872d879_fce23ff024465bf0900f1@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/3da1e69d-cb2e-495c-87f2-c5b770e9fab2?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 35ms (ActiveRecord: 2.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2312]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2313) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.216992"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.216992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2314]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2314) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.261922"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:39.261922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2315) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2315) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2315) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2315) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2315 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:39.333493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2314]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2315) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.359273"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.359273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2316]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2316) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.405890"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:39.405890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2317) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2317) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2317) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2317) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2317 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:28:39.478764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:39.484362"], ["updated_at", "2014-10-13 13:28:39.484362"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "859b656d-9575-474e-a4db-401722bb1b8b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 21.7ms Sent mail to bob.smith@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:28:39 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd3877b239_fce23ff024465bf0901e8@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/859b656d-9575-474e-a4db-401722bb1b8b?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 40ms (ActiveRecord: 2.2ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2316]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2317) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.536264"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.536264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2318]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2318) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.579991"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:39.579991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2319) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2319) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.2ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2319) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2319) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2319 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:28:39.649268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020 Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2318]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e15c9cb9-8486-46a6-92bc-1ccbc2e3b020' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2319) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.676088"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.676088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2320]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2320) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.8ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.726045"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:39.726045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2321) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2321) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 39.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2321) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2321) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2321 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 13:28:39.807549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af Completed 302 Found in 13ms (ActiveRecord: 2.0ms) Started GET "/people/test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2320]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-7a128c57-5c63-4177-b1ba-58c1e8f416af' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2321) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.847016"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.847016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2322]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 19ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2322) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:39.894883"], ["slug", "surname-0062"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 13:28:39.894883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0062/edit" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0062"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0062' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2323) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.3ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0062" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0062"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0062' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2323) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2323]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2322]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.3ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:39.969736"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:39.969736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2324]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2324) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 32.5ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.015700"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:40.015700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2325) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2325) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2325) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2325) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2325 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:40.090340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.096450"], ["updated_at", "2014-10-13 13:28:40.096450"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "133797d3-18c6-408a-82a6-97c38d5b0a32"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 8.7ms Sent mail to bob.smithe@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:28:40 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bd38819364_fce23ff024465bf090294@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/133797d3-18c6-408a-82a6-97c38d5b0a32?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.111882"], ["updated_at", "2014-10-13 13:28:40.111882"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "c2d5b8c4-093c-4027-b056-bf5b442a8b0f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 8.6ms Sent mail to bob.smith@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:28:40 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd3881cedb_fce23ff024465bf090360@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/c2d5b8c4-093c-4027-b056-bf5b442a8b0f?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 43ms (ActiveRecord: 2.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2324]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2325) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.149530"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.149530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2326]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2326]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2326]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2326) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2326]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 27.7ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2326]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:40.252420"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-eb605887-562f-4ebd-a91e-13f444963a99"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:40.252420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-eb605887-562f-4ebd-a91e-13f444963a99 Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-eb605887-562f-4ebd-a91e-13f444963a99" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-eb605887-562f-4ebd-a91e-13f444963a99"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2326]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-eb605887-562f-4ebd-a91e-13f444963a99' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2327) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.281913"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.281913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2328]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2328]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2328]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2328) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2328]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.2ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2328]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:40.378058"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:40.378058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.384512"], ["updated_at", "2014-10-13 13:28:40.384512"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "e0d85507-aadb-421b-8189-5311d0b63687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 13.1ms Sent mail to bob.smith@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:28:40 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd388605ed_fce23ff024465bf090413@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/e0d85507-aadb-421b-8189-5311d0b63687?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 28ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2328]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2329) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.426950"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.426950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2330]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2330) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.471975"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 13:28:40.471975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2331) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 41.8ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2331) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 7.5ms Sent mail to bob.smith@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:28:40 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bd38883a4f_fce23ff024465bf0905a7@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2331]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 20ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2330]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.574332"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.574332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2332]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2332) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.619819"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 13:28:40.619819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe/edit" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2333) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.6ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ce6645d8-09e8-4662-963b-adf29d3c0efe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2333) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2333]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2332]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.700114"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.700114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2334]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2334) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.744027"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 13:28:40.744027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91/edit" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2335) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0ef5977b-8ae7-4ce7-9390-dc692bf96c91' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2335) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2335]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2334]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:40.833648"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:40.833648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2336]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2336]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2336]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2336) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 33.9ms | ActiveRecord: 1.6ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2336]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2336]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:40.930790"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-6579543a-8572-4539-a461-9e0a7232e798"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:40.930790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-6579543a-8572-4539-a461-9e0a7232e798 Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-6579543a-8572-4539-a461-9e0a7232e798" for 127.0.0.1 at 2014-10-13 14:28:40 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-6579543a-8572-4539-a461-9e0a7232e798"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2336]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-6579543a-8572-4539-a461-9e0a7232e798' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2337) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.954912"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 13:28:40.954912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.958042"], ["slug", "surname-0067"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 13:28:40.958042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.964676"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:40.964676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1852]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1852]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1852]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1852"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:40.969348"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:40.969348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.970683"], ["group_id", 1853], ["person_id", 2339], ["updated_at", "2014-10-13 13:28:40.970683"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:40.971379' WHERE "people"."id" = 2339 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:40.972037' WHERE "groups"."id" = 1853  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"372"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2338]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 372]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 372]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2339]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:40.977671' WHERE "people"."id" = 2339 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1853]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:40.979201' WHERE "groups"."id" = 1853  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.984010"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 13:28:40.984010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.986687"], ["slug", "surname-0069"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 13:28:40.986687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:40.993689"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:40.993689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1854]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1854]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1854]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1854"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:40.998576"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:40.998576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:40.999861"], ["group_id", 1855], ["person_id", 2341], ["updated_at", "2014-10-13 13:28:40.999861"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:41.000566' WHERE "people"."id" = 2341 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:41.001189' WHERE "groups"."id" = 1855  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"373"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2340]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 373]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 373]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2341]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:41.005899' WHERE "people"."id" = 2341 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1855]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:41.007275' WHERE "groups"."id" = 1855  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 373]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.016022"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0070"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 13:28:41.016022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:41.020600"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 13:28:41.020600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.024454"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:28:41.024454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.037906"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 13:28:41.037906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.041260"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:28:41.041260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.048953"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:41.048953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.075695"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:41.075695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2348]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2348]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2348]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2348) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.122527"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.122527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1856"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.128260"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.128260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1857]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1857]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1857]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1856/1857"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:41.133830"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.133830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1856]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1856"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.139865"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.139865"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1859]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1859]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1859]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1856/1859"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:41.145577"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.145577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.148228"], ["slug", "surname-0072"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 13:28:41.148228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.149734"], ["group_id", 1858], ["person_id", 2349], ["updated_at", "2014-10-13 13:28:41.149734"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:41.150417' WHERE "people"."id" = 2349 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:41.151041' WHERE "groups"."id" = 1858  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.152249"], ["group_id", 1860], ["person_id", 2349], ["updated_at", "2014-10-13 13:28:41.152249"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:41.152882' WHERE "people"."id" = 2349 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:41.153443' WHERE "groups"."id" = 1860  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2348]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1860) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1856, 1859, 1860) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1860]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (9.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1856/1859/1860' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1856/1859/1860' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1860]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 39.8ms | ActiveRecord: 2.7ms) Started GET "/people/surname-0072" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0072"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2348]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0072' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2349) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1860]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1856, 1857, 1858) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1856, 1859, 1860) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1856, 1857, 1858) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1856, 1859, 1860) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.240744"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:41.240744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2350]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2350]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2350) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.285353"], ["slug", "surname-0073"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 13:28:41.285353"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0073" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0073"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2350]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0073' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2351) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.5ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.311659"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:41.311659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2352]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2352]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2352) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.358123"], ["slug", "surname-0074"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 13:28:41.358123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0074" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0074"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2352]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0074' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2353) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.381858"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.381858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1861]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1861]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1861]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1861"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.386561"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.386561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.389310"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 13:28:41.389310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.393659"], ["updated_at", "2014-10-13 13:28:41.393659"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "fe53b793-de10-4944-b829-396e0a601b7e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2354]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 14.0ms Sent mail to test.user@digital.justice.gov.uk (5.1ms) Date: Mon, 13 Oct 2014 14:28:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd3896307a_fce23ff024465bf09065@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/fe53b793-de10-4944-b829-396e0a601b7e?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/fe53b793-de10-4944-b829-396e0a601b7e?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"fe53b793-de10-4944-b829-396e0a601b7e"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'fe53b793-de10-4944-b829-396e0a601b7e' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 4ms (ActiveRecord: 0.7ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2354]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2354) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.464885"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.464885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1863]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1863]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1863]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1863"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.469555"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.469555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.474064"], ["updated_at", "2014-10-13 13:28:41.474064"], ["user_email", "example.user.28@digital.justice.gov.uk"], ["value", "516e5c03-3c34-45a8-b5bb-7c35ac0304aa"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/516e5c03-3c34-45a8-b5bb-7c35ac0304aa" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"516e5c03-3c34-45a8-b5bb-7c35ac0304aa"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '516e5c03-3c34-45a8-b5bb-7c35ac0304aa' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.28@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-28' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.481327"], ["email", "example.user.28@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-28"], ["surname", "user"], ["updated_at", "2014-10-13 13:28:41.481327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2355]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2355]] Redirected to http://www.example.com/people/example-user-28/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/example-user-28/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-28"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2355]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-28' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2355) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 45.3ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.549503"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.549503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1865]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1865]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1865]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1865"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.554254"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.554254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.557972"], ["updated_at", "2014-10-13 13:28:41.557972"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "9115e0af-6ab4-4d22-b7bf-11f04d9c9654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/9115e0af-6ab4-4d22-b7bf-11f04d9c9654" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"9115e0af-6ab4-4d22-b7bf-11f04d9c9654"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '9115e0af-6ab4-4d22-b7bf-11f04d9c9654' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:41.565291"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 13:28:41.565291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2356]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2356]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2356]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2356) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 10.1ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.637271"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.637271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1867]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1867]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1867]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1867"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.642065"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.642065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.676081"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.676081"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1869]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1869]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1869]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1869"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.681381"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.681381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.712310"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.712310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1871]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1871]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1871]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0015-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1871"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.717519"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.717519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.720351"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:28:41.720351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.724488"], ["updated_at", "2014-10-13 13:28:41.724488"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "fd100502-82d8-4e47-9da0-0cf62b1ddd0f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/fd100502-82d8-4e47-9da0-0cf62b1ddd0f" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"fd100502-82d8-4e47-9da0-0cf62b1ddd0f"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'fd100502-82d8-4e47-9da0-0cf62b1ddd0f' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2357]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2357]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2357]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2357) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.780062"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.780062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1873]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1873]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1873"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.784706"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.784706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 14:28:41 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:41.803012"], ["updated_at", "2014-10-13 13:28:41.803012"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "50b35960-8399-4156-9b28-43a8c8caf823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 8.5ms Sent mail to james.darling@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 14:28:41 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bd389c749a_fce23ff024465bf09071d@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/50b35960-8399-4156-9b28-43a8c8caf823 If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 4.9ms | ActiveRecord: 0.3ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:41.838100"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:28:41.838100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:41.849767"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:28:41.849767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:41.859606"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:28:41.859606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:41.880643"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:28:41.880643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:41.890743"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 13:28:41.890743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.909857"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.909857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.924428"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.924428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.932267"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 13:28:41.932267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.940850"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.940850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1877"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.945448"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.945448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0019"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2363]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0019' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1878) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1877]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1878) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1878) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.961425"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 13:28:41.961425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.968705"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.968705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1879"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:41.973015"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.973015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0020"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2364]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0020' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1880) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1879]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1880) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1880) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.5ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.988392"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 13:28:41.988392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:41.996076"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:41.996076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1881"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.000995"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.000995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0021"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2365]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0021' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1882) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1881]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1882) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 1882) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.016249"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 13:28:42.016249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.023635"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.023635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1883]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1883]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1883]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1883"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.030126"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.030126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0022", "team_email_address"=>"example.user.49@digital.justice.gov.uk"}, "id"=>"group-0022"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2366]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0022' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1884) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0022' AND "groups"."id" != 1884) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0022 Completed 302 Found in 7ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.042939"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 13:28:42.042939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.050375"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.050375"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1885"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.055301"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.055301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0024", "team_email_address"=>"example.user.53@digital.justice.gov.uk"}, "id"=>"group-0023"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2367]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0023' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1886) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1885]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1886) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0024' AND "groups"."id" != 1886) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 1886 [["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.067247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0024 Completed 302 Found in 11ms (ActiveRecord: 2.6ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1886]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.072749"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 13:28:42.072749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.082552"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.082552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1887]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1887]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1887]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1887"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.087598"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.087598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0025", "team_email_address"=>"example.user.54@digital.justice.gov.uk"}, "id"=>"group-0025"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2368]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0025' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1888) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0025' AND "groups"."id" != 1888) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0025 Completed 302 Found in 8ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.101379"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 13:28:42.101379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.109362"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.109362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1889]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1889]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1889]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1889"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.114480"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.114480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0026"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2369]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0026' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1890) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.125193"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 13:28:42.125193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.128564"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.128564"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1891]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1891]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1891]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1891"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.133876"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.133876"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0028"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2370]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0028' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1892) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1891]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1891]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1891/1892/%' OR "groups"."ancestry" = '1891/1892')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1891/1892' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1892]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0027 Completed 302 Found in 10ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.150020"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 13:28:42.150020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.157706"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.157706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1893]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1893"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.163877"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.163877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2371]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0029' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1894) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1893]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1893]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1893/1894/%' OR "groups"."ancestry" = '1893/1894')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1893/1894' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1894]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.1ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.178986"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 13:28:42.178986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.186351"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.186351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1895]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1895]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1895]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1895"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.191066"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.191066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0030"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2372]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0030' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1896) ORDER BY people.surname Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.203021"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 13:28:42.203021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.209128"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.209128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2373]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.216505"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 13:28:42.216505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2374]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.223775"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 13:28:42.223775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.229625"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.229625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1898]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1898]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1898]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1898"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.235150"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.235150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2375]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.243440"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 13:28:42.243440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2376]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.256588"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 13:28:42.256588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2377]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.267037"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 13:28:42.267037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2378]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.277216"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 13:28:42.277216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0032", "team_email_address"=>"example.user.67@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2379]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.283264"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.283264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0032 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.288187"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 13:28:42.288187"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0033", "team_email_address"=>"example.user.68@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2380]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.295670"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.295670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0033 Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.301948"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 13:28:42.301948"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0034", "team_email_address"=>"example.user.69@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2381]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.308594"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.308594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0034 Completed 302 Found in 5ms (ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.314900"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 13:28:42.314900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2382]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.322640"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 13:28:42.322640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2383]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:42.337262"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:42.337262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2384]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2384]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 22ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2384]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2384) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.2ms | ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.407939"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.407939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1903]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1903]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1903]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1903"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.412945"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.412945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1904]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1904]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1904]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1903/1904"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:42.417813"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.417813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1905]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1905]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1905]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1903/1904/1905"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:42.422504"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.422504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2384]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1906) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1903, 1904, 1905, 1906) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1906]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1903/1904/1905/1906' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1903/1904/1905/1906' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1906]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:42.453553"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:42.453553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2385]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2385]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2385]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2385) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.501508"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.501508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1907]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1907]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1907]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1907"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.506448"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.506448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1908]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1908]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1908]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1907/1908"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:42.513645"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.513645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1909]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1909]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1909]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1907/1908/1909"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:42.519414"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.519414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.522263"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:28:42.522263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:42.523873"], ["group_id", 1908], ["person_id", 2386], ["updated_at", "2014-10-13 13:28:42.523873"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:42.524565' WHERE "people"."id" = 2386 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:42.525255' WHERE "groups"."id" = 1908  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.527885"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:28:42.527885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:42.529465"], ["group_id", 1908], ["person_id", 2387], ["updated_at", "2014-10-13 13:28:42.529465"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:42.530482' WHERE "people"."id" = 2387 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:42.531660' WHERE "groups"."id" = 1908  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.534678"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:28:42.534678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:42.536404"], ["group_id", 1908], ["person_id", 2388], ["updated_at", "2014-10-13 13:28:42.536404"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:42.537116' WHERE "people"."id" = 2388 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:42.537819' WHERE "groups"."id" = 1908  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2385]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1908) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1907, 1908) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1908]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1907/1908' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1907/1908' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1907/1908' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.7ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:42.573674"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:42.573674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2389]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2389]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2389) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:42.620252"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.620252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1911"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.625257"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.625257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1912]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1912]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1912]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1911/1912"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:42.629975"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.629975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1913]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1913]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1913]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1911/1912/1913"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:42.634922"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.634922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1911) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1911 [["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.637860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1911"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:42.642539"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:42.642539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1915) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1911, 1915) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1915]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1911/1915' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1911/1915' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1915]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.2ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1915) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1911, 1915) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1911]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1911) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1911/1915' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 19.4ms | ActiveRecord: 2.3ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 14:28:42 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1915) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1911, 1915) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1915 OR "groups"."ancestry" ILIKE '1911/1915/%') OR "groups"."ancestry" = '1911/1915')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.3ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1915) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.5ms | ActiveRecord: 3.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:44.070360"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.070360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1916]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1916]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1916]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1916"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:44.076233"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.076233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1917]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1917]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1917]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1916/1917"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:44.081570"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.081570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1918]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1918]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1918]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1916/1917/1918"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:44.087037"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.087037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.1ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:44.622175"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:44.622175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2390]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2390]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2390]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2390) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.1ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2390]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2390]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2390]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 14:28:44 +0100  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:44.909835"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:44.909835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2391]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:44 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2391]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2391) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 43ms (Views: 37.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:44.966510"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.966510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1920]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1920]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1920]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1920"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:44.972674"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.972674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1921]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1921]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1921]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1920/1921"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:44.992702"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:44.992702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1922]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1922]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1922]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1920/1921/1922"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:45.000645"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.000645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1920) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1920) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1920]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.4ms | ActiveRecord: 1.8ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1921) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1920, 1921) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.5ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1921]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.7ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 18.6ms | ActiveRecord: 2.7ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1922) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1920, 1921, 1922) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1922]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921/1922' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921/1922' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1920/1921/1922' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 32ms (Views: 22.8ms | ActiveRecord: 3.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:45.097083"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:45.097083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2392]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2392]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2392]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2392) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 43.0ms | ActiveRecord: 1.6ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.163341"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.163341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1924]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1924]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1924]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1924"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:45.169301"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.169301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1925]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1925]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1925]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1924/1925"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:45.174856"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.174856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1926]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1926]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1926]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1924/1925/1926"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:45.181134"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.181134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.184248"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:28:45.184248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.185796"], ["group_id", 1927], ["person_id", 2393], ["updated_at", "2014-10-13 13:28:45.185796"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.186479' WHERE "people"."id" = 2393 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.187137' WHERE "groups"."id" = 1927  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.189678"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:28:45.189678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.191554"], ["group_id", 1927], ["person_id", 2394], ["updated_at", "2014-10-13 13:28:45.191554"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.192317' WHERE "people"."id" = 2394 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.192959' WHERE "groups"."id" = 1927  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.196339"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:28:45.196339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.197835"], ["group_id", 1927], ["person_id", 2395], ["updated_at", "2014-10-13 13:28:45.197835"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.198492' WHERE "people"."id" = 2395 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.199081' WHERE "groups"."id" = 1927  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2392]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1927) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1924, 1925, 1926, 1927) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1927]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1924/1925/1926/1927' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1924/1925/1926/1927' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1927]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.2ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:45.240931"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:45.240931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2396]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2396]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2396]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2396) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.291722"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.291722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1928]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1928]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1928]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1928"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:45.297772"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.297772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1929]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1929]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1929]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1928/1929"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:45.302869"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.302869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1930]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1930]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1930]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1928/1929/1930"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:45.308286"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.308286"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.311327"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 13:28:45.311327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.312954"], ["group_id", 1929], ["person_id", 2397], ["updated_at", "2014-10-13 13:28:45.312954"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.313610' WHERE "people"."id" = 2397 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.314283' WHERE "groups"."id" = 1929  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.316643"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 13:28:45.316643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.318062"], ["group_id", 1929], ["person_id", 2398], ["updated_at", "2014-10-13 13:28:45.318062"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.318665' WHERE "people"."id" = 2398 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.319263' WHERE "groups"."id" = 1929  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.321656"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 13:28:45.321656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:45.323080"], ["group_id", 1929], ["person_id", 2399], ["updated_at", "2014-10-13 13:28:45.323080"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:45.323701' WHERE "people"."id" = 2399 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:45.324280' WHERE "groups"."id" = 1929  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2396]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1929) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1928, 1929) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1929]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1928/1929' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1928/1929' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1928/1929' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.8ms | ActiveRecord: 2.1ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2396]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1929) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1928, 1929) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.5ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 1929 OR "groups"."ancestry" ILIKE '1928/1929/%') OR "groups"."ancestry" = '1928/1929')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.0ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (1931,1930,1929) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 3.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (10.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:45.399054"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.399054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1932]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1932]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1932]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1932"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:45.405678"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.405678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1933]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1933]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1933]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1932/1933"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:45.410832"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.410832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1934]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1934]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1934]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1932/1933/1934"], ["ancestry_depth", 3], ["created_at", "2014-10-13 13:28:45.416411"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:45.416411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:45.851901"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:45.851901"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2400]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2400) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:45 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:46 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 14:28:46 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2400]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1935) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1932, 1933, 1934, 1935) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1935]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1932/1933/1934/1935' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1932/1933/1934/1935' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1935]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.147982"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:28:46.147982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.150442"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:28:46.150442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2402], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2401]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.6ms Sent mail to recipient@example.com (4.8ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd38e2913e_fce23ff024465bf09084d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.176600"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:28:46.176600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.179456"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:28:46.179456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2404], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2403]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.6ms Sent mail to recipient@example.com (4.5ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd38e2daf8_fce23ff024465bf090988@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.195906"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:28:46.195906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.198374"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:28:46.198374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2406], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2405]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.7ms Sent mail to recipient@example.com (4.4ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd38e324a3_fce23ff024465bf09101c@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.213794"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:28:46.213794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.216245"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:28:46.216245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2408], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2407]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.5ms Sent mail to recipient@example.com (4.5ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd38e369e2_fce23ff024465bf091152@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.232206"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 13:28:46.232206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.234682"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 13:28:46.234682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2410], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2409]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 4.2ms Sent mail to recipient@example.com (5.2ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bd38e3b057_fce23ff024465bf091227@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.251468"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 13:28:46.251468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.256501"], ["updated_at", "2014-10-13 13:28:46.256501"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "abdf86c1-46ff-4391-b91f-61c8e7753f87"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2411]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 11.1ms Sent mail to test.user@digital.justice.gov.uk (4.8ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd38e40a10_fce23ff024465bf0913cf@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/abdf86c1-46ff-4391-b91f-61c8e7753f87?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.273219"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 13:28:46.273219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.277130"], ["updated_at", "2014-10-13 13:28:46.277130"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "ebb13bd2-63e4-4b88-af51-67cf3e332f67"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2412]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.4ms Sent mail to test.user@digital.justice.gov.uk (4.9ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd38e45b48_fce23ff024465bf0914b8@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/ebb13bd2-63e4-4b88-af51-67cf3e332f67?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.294853"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 13:28:46.294853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.299514"], ["updated_at", "2014-10-13 13:28:46.299514"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "74f2a73b-eed8-4cdc-a47e-be494f1a4cd4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2413]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 10.7ms Sent mail to test.user@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd38e4b1de_fce23ff024465bf091535@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/74f2a73b-eed8-4cdc-a47e-be494f1a4cd4?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.316592"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 13:28:46.316592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.320918"], ["updated_at", "2014-10-13 13:28:46.320918"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "de2ddaaa-6f20-423a-8c18-8f8d8dc10535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2414]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 22.6ms Sent mail to test.user@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd38e5348b_fce23ff024465bf0916aa@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/de2ddaaa-6f20-423a-8c18-8f8d8dc10535?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.351269"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 13:28:46.351269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:46.355388"], ["updated_at", "2014-10-13 13:28:46.355388"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d161bd31-6224-4c46-ab5c-a05977bd170d"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2415]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 14.8ms Sent mail to test.user@digital.justice.gov.uk (5.2ms) Date: Mon, 13 Oct 2014 14:28:46 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bd38e59d46_fce23ff024465bf091772@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d161bd31-6224-4c46-ab5c-a05977bd170d?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0102' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:46.647718"], ["image", "placeholder.png"], ["slug", "surname-0102"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 13:28:46.647718"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0103' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:47.406034"], ["image", "placeholder.png"], ["slug", "surname-0103"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 13:28:47.406034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0104' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:47.506738"], ["slug", "surname-0104"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 13:28:47.506738"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 2418 [["updated_at", "2014-10-13 13:28:47.508768"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0105' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:47.512759"], ["slug", "surname-0105"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 13:28:47.512759"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0106' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:47.516408"], ["slug", "surname-0106"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 13:28:47.516408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:47.527788"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:47.527788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2421]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2421) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 41.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:47.589654"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:47.589654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1936]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1936"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:47.595185"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:47.595185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0107' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:47.598173"], ["slug", "surname-0107"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 13:28:47.598173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:47.600679"], ["group_id", 1937], ["person_id", 2422], ["updated_at", "2014-10-13 13:28:47.600679"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2422]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:47.602157' WHERE "people"."id" = 2422 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:47.602833' WHERE "groups"."id" = 1937  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0107" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0107"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0107' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2422) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1936, 1937) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1936, 1937) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 1.4ms) Started GET "/people/surname-0107/reported_profiles/new" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0107"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0107' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 14.3ms | ActiveRecord: 0.6ms) Started POST "/people/surname-0107/reported_profiles" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0107"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0107' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2422]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 2421], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.104@digital.justice.gov.uk"], ["subject_id", 2422]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 6.1ms Sent mail to example.user.104@digital.justice.gov.uk (5.3ms) Date: Mon, 13 Oct 2014 14:28:47 +0100 From: support@example.com To: example.user.104@digital.justice.gov.uk Message-ID: <543bd38fa15ed_fce23ff024465bf0918d2@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0107 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0107 Redirected to http://www.example.com/people/surname-0107 Completed 302 Found in 18ms (ActiveRecord: 1.2ms) Started GET "/people/surname-0107" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0107"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2421]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0107' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2422) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1936, 1937) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1936, 1937) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:47.695410"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:47.695410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2423]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2423) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.9ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 43.4ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:47.812719"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:47.812719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 13ms (ActiveRecord: 1.3ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.6ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2424) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2423]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2424) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:47.904206"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:47.904206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2425]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2425) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:47.951634"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:47.951634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.2ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:47 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2426]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.5ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2425]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:48.050019"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:48.050019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2427]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2427) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.0ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.0ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:48.157810"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:48.157810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2428) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2427]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2428) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 35.7ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:48.242592"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:48.242592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2429]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2429]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2429]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2429) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.2ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0108' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:48.292211"], ["slug", "surname-0108"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 13:28:48.292211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0108/edit" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0108"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2429]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0108' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2430) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.4ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:48.347733"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:48.347733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2431]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2431) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 42.6ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:48.404811"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:48.404811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:48.407270"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 13:28:48.407270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2433) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2433) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 2433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2432]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 9.8ms | ActiveRecord: 1.7ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2433) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2433 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:48.488581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2431]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2433) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:48.517016"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:48.517016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2434]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2434]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2434) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.2ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:48.566776"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:48.566776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2435) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2435) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2434]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2435) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 29.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:48.689739"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:48.689739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1938]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1938]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1938]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1938"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:48.704236"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:48.704236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0109' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:48.707640"], ["slug", "surname-0109"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 13:28:48.707640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:48 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:49.165782"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:49.165782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2437]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2437) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.1ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0109/edit" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2436) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) Started PATCH "/people/surname-0109" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0109", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1938", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2436) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0109' AND "people"."given_name" = '' AND ("people"."id" != 2436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 2436 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:49.508589"]] SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:49.510016"], ["group_id", 1938], ["person_id", 2436], ["role", ""], ["updated_at", "2014-10-13 13:28:49.510016"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2436]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:49.512663' WHERE "people"."id" = 2436 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1938]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:49.514377' WHERE "groups"."id" = 1938  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/surname-0109 Completed 302 Found in 18ms (ActiveRecord: 3.2ms) Started GET "/people/surname-0109" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2436) ORDER BY groups.name Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1938) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1938) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.6ms | ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0109/edit" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2436) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1938) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1938) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2436]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 39.4ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2437]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:49.739392"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:49.739392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2438]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2438]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2438) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.5ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2438]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 38.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2438]] Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 28.8ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:49.893418"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:49.893418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1940]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1940]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1940]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1940"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:49.900092"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:49.900092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 7.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:50.339167"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:50.339167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2439]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2439) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.5ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.8ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1941", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:28:50.678252"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:50.678252"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:50.679662"], ["group_id", 1941], ["person_id", 2440], ["role", ""], ["updated_at", "2014-10-13 13:28:50.679662"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2440]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:50.681297' WHERE "people"."id" = 2440 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1941]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:50.682821' WHERE "groups"."id" = 1941  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/marco-polo/image/edit Completed 302 Found in 19ms (ActiveRecord: 2.4ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64743/people/marco-polo?cache_bust=1413206930 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413206930" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206930", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2439]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2440) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1940, 1941) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1940, 1941) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.2ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:50.905522"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:50.905522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2441]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2441) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0110' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:50.956949"], ["slug", "surname-0110"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 13:28:50.956949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0110/edit" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0110"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2442) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.5ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0110" for 127.0.0.1 at 2014-10-13 14:28:50 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0110"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0110' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2442) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2442]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2441]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.7ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2442]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:51.031984"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:51.031984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2443]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2443) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 13:28:51.080039"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:51.080039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2444) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 15ms (Views: 10.0ms | ActiveRecord: 1.0ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2444) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.9ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2444) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 2444) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2444 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:51.163059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 12ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2443]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2444) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:51.205897"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:51.205897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2445]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2445]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2445]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2445) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2445]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 34ms (Views: 31.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:51.298057"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:51.298057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2446]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2446]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2446) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0111' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:51.345452"], ["slug", "surname-0111"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 13:28:51.345452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:51.352615"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:51.352615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1942]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1942]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1942]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1942"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:51.357412"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:51.357412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:51.358770"], ["group_id", 1943], ["person_id", 2447], ["updated_at", "2014-10-13 13:28:51.358770"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:51.359438' WHERE "people"."id" = 2447 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:51.360090' WHERE "groups"."id" = 1943  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0111/edit" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0111"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2446]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0111' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2447) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1942, 1943) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1942, 1943) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2447]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.6ms | ActiveRecord: 1.8ms) Started DELETE "/people/surname-0111" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0111"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2446]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0111' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2447) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 388]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2447]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:51.415840' WHERE "people"."id" = 2447 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:51.416573' WHERE "groups"."id" = 1943 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2447]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2446]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 388]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2447]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:51.439581"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:51.439581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1944]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1944]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1944]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1944"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:51.444396"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:51.444396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:51.447700"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:51.447700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:51.874940"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:51.874940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2449]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2449) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (11.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.3ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1945", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2448]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 10.5ms | ActiveRecord: 1.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"1945"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413206932-64738-7274/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 13:28:52.295823"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:52.295823"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.296885"], ["group_id", 1945], ["person_id", 2450], ["role", ""], ["updated_at", "2014-10-13 13:28:52.296885"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2450]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:52.298374' WHERE "people"."id" = 2450 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1945]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:52.299945' WHERE "groups"."id" = 1945  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb/image/edit Completed 302 Found in 16ms (ActiveRecord: 2.2ms) Started GET "/people/marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb/image/edit" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 7.8ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb/image" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:64743/people/marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb?cache_bust=1413206932 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb?cache_bust=1413206932" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413206932", "id"=>"marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2449]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-68a1ee4a-3fac-458d-9afa-b90a2eb4deeb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2450) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1944, 1945) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1944, 1945) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.5ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:52.510425"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:52.510425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2451]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2451]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2451]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2451) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.557588"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 13:28:52.557588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 2452 [["email", nil], ["updated_at", "2014-10-13 13:28:52.558923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2451]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2452) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:52.586410"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:52.586410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2453]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2453]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2453]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2453) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 46.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.646610"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 13:28:52.646610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2454]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2454 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:52.651902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.664057"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:52.664057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1946]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1946]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1946]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1946"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:52.669680"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:52.669680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:52.672268"], ["group_id", 1947], ["person_id", 2454], ["updated_at", "2014-10-13 13:28:52.672268"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2454]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:52.673859' WHERE "people"."id" = 2454 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:52.674722' WHERE "groups"."id" = 1947  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2453]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2454) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1946, 1947) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1946, 1947) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.8ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:52.709311"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:52.709311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2455]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2455) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.756423"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 13:28:52.756423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2456) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.1ms | ActiveRecord: 0.6ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 2456], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:52.802691"], ["updated_at", "2014-10-13 13:28:52.802691"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "e05f0fdc-38a6-400e-abe9-f298ab7af221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 14.2ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:28:52 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd394c6e79_fce23ff024465bf091942@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/e05f0fdc-38a6-400e-abe9-f298ab7af221?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 24ms (ActiveRecord: 1.3ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2455]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2456) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:52.849890"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:52.849890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2457]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2457]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2457]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2457) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.897942"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-01d09e83-64d3-4051-969c-7eb94a188b39"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 13:28:52.897942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-01d09e83-64d3-4051-969c-7eb94a188b39" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-01d09e83-64d3-4051-969c-7eb94a188b39"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2457]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-01d09e83-64d3-4051-969c-7eb94a188b39' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2458) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 21.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:52.939628"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:52.939628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2459]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2459]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2459]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2459) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:52.986299"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-5362e66f-b2ce-4f02-8b20-4537076f7243"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 13:28:52.986299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2460]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2460 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 13:28:52.991190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.001147"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:53.001147"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1948]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1948]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1948]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1948"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:53.005555"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:53.005555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:53.007627"], ["group_id", 1949], ["person_id", 2460], ["updated_at", "2014-10-13 13:28:53.007627"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2460]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:53.008948' WHERE "people"."id" = 2460 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:53.009612' WHERE "groups"."id" = 1949  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-5362e66f-b2ce-4f02-8b20-4537076f7243" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-5362e66f-b2ce-4f02-8b20-4537076f7243"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2459]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-5362e66f-b2ce-4f02-8b20-4537076f7243' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2460) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1948, 1949) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1948, 1949) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.041557"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:53.041557"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.050149"], ["event", "create"], ["item_id", 1950], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.119@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1950]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1950]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1950]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1950"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:53.055818"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:53.055818"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.057958"], ["event", "create"], ["item_id", 1951], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.118@digital.justice.gov.uk\nancestry:\n- \n- '1950'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:53.060778"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:28:53.060778"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.063271"], ["event", "create"], ["item_id", 2461], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:53.497820"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:53.497820"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:53.500027"], ["event", "create"], ["item_id", 2462], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2462]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2462) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2461) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"1951", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2461) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 2461) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2461 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:53.761724"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:53.765685"], ["event", "update"], ["item_id", 2461], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2461\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:28:53.060778000 Z\nupdated_at: 2014-10-13 13:28:53.060778000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:53.767030"], ["group_id", 1951], ["person_id", 2461], ["role", "Jefe"], ["updated_at", "2014-10-13 13:28:53.767030"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:53.770231"], ["event", "create"], ["item_id", 392], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 1951\nperson_id:\n- \n- 2461\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2461]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:53.771911' WHERE "people"."id" = 2461 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1951]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:53.773350' WHERE "groups"."id" = 1951  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/bob Completed 302 Found in 23ms (ActiveRecord: 3.3ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2461) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1950, 1951) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1950, 1951) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 11.4ms | ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.4ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 392]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2461]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1951]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (3.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2461]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.0ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2462]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2461]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1951]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1950]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 27.3ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:53.974092"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:53.974092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2463]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:53 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2463) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:54.025730"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.025730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1952"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:54.030372"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.030372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1953) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1952, 1953) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1952) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1952/1953' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.5ms | ActiveRecord: 2.2ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"1952", "team_email_address"=>"example.user.120@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1953) ORDER BY people.surname  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1952]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 1953) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 1953) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 1953 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 13:28:54.071949"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:54.075113"], ["event", "update"], ["item_id", 1953], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1953\nname: original name\ncreated_at: 2014-10-13 13:28:54.030372000 Z\nupdated_at: 2014-10-13 13:28:54.030372000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '1952'\nancestry_depth: 1\nteam_email_address: example.user.120@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 15ms (ActiveRecord: 3.0ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1953) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1952, 1953) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1953]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1952/1953' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1952/1953' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1953]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2463]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1953]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.118384"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.118384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2464]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2464) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:54.165769"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.165769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1954]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1954]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1954]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1954"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:54.172382"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.172382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:54.175956"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 13:28:54.175956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.179105"], ["group_id", 1955], ["leader", "t"], ["person_id", 2465], ["role", "Jefe"], ["updated_at", "2014-10-13 13:28:54.179105"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2465]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:54.181095' WHERE "people"."id" = 2465 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:54.182154' WHERE "groups"."id" = 1955  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2465) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1954, 1955) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1954, 1955) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2465]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 56ms (Views: 49.5ms | ActiveRecord: 1.9ms) Started DELETE "/memberships/393?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"393"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 393]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 393]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.250195"], ["event", "destroy"], ["item_id", 393], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 393\ngroup_id: 1955\nperson_id: 2465\nrole: Jefe\ncreated_at: 2014-10-13 13:28:54.179105000 Z\nupdated_at: 2014-10-13 13:28:54.179105000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 393], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2465]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:54.253254' WHERE "people"."id" = 2465 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1955]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:54.254742' WHERE "groups"."id" = 1955  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2465) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2464]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 393]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2465]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1955]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.321929"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.321929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2466]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2466) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.6ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.4ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:54.420094"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 13:28:54.420094"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.422499"], ["event", "create"], ["item_id", 2467], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 11ms (ActiveRecord: 1.4ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2467) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2467]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.0ms | ActiveRecord: 0.9ms)  (0.7ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/209" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"209"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 209]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2467]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2467]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2467]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.470917"], ["event", "destroy"], ["item_id", 2467], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2467\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:28:54.420094000 Z\nupdated_at: 2014-10-13 13:28:54.420094000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2467], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2466]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2467]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2467]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 26.7ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.513760"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.513760"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2468]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2468) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:54.559125"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 13:28:54.559125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2469) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.6ms | ActiveRecord: 0.9ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2469) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 2469) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2469 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 13:28:54.615322"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:54.618640"], ["event", "update"], ["item_id", 2469], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2469\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:28:54.559125000 Z\nupdated_at: 2014-10-13 13:28:54.559125000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 14ms (ActiveRecord: 2.0ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2469) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2469]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.8ms) Started POST "/audit_trail/undo/211" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"211"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]] Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 211]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2469]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2469) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2469 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 13:28:54.660074"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:54.663315"], ["event", "update"], ["item_id", 2469], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2469\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 13:28:54.559125000 Z\nupdated_at: 2014-10-13 13:28:54.615322000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2468]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2469]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2469]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2469]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.687649"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.687649"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2470]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 17ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2470) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:54.748814"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.748814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1956"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:54.753642"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:54.753642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1957) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1956, 1957) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1956) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1956/1957' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 20.0ms | ActiveRecord: 2.5ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1957) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1956]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '1956/1957/%' OR "groups"."ancestry" = '1956/1957')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1956/1957' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 1957]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.805268"], ["event", "destroy"], ["item_id", 1957], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 1957\nname: original name\ncreated_at: 2014-10-13 13:28:54.753642000 Z\nupdated_at: 2014-10-13 13:28:54.753642000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '1956'\nancestry_depth: 1\nteam_email_address: example.user.124@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 1957], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 21ms (ActiveRecord: 2.6ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1956) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1956) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1956]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1956' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1956' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1956]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2470]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1957]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.853573"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.853573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2471]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2471) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:54.928578"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 13:28:54.928578"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.932184"], ["event", "create"], ["item_id", 1958], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1958) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1958) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1958]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1958' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1958' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1958]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2471]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1958]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:54.979543"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:54.979543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2472]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:54 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2472) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0117' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:55.025199"], ["slug", "surname-0117"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 13:28:55.025199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0117/edit" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0117"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0117' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2473) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.0ms) Started PATCH "/people/surname-0117" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0117", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0117"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0117' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2473) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0117' AND "people"."given_name" = '' AND ("people"."id" != 2473) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2473]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 2473 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:55.093675"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 13:28:55.101975"], ["event", "update"], ["item_id", 2473], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2473\ngiven_name: \nsurname: Surname-0117\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 13:28:55.025199000 Z\nupdated_at: 2014-10-13 13:28:55.025199000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2473\n given_name: ''\n surname: Surname-0117\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 13:28:55.093675000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0117\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2473\n given_name: ''\n surname: Surname-0117\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 13:28:55.025199000 Z\n updated_at: &2 2014-10-13 13:28:55.093675000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0117\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2473\n given_name: ''\n surname: Surname-0117\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0117\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70300692981020\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2473\n given_name: ''\n surname: Surname-0117\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0117\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206935-64738-5282\n cache_id: 1413206935-64738-5282\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206935-64738-5282/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70300693091980\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2473\n given_name: ''\n surname: Surname-0117\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0117\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413206935-64738-5282\n cache_id: 1413206935-64738-5282\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206935-64738-5282/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413206935-64738-5282\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413206935-64738-5282/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0117/image/edit Completed 302 Found in 33ms (ActiveRecord: 2.7ms) Started GET "/people/surname-0117/image/edit" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0117"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0117' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2472]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2473]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.142597"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.142597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2474]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2474) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.190812"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:28:55.190812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2475) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.3ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2475) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2475]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.247051"], ["event", "destroy"], ["item_id", 2475], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2475\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 13:28:55.190812000 Z\nupdated_at: 2014-10-13 13:28:55.190812000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2475], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 11ms (ActiveRecord: 2.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2475]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.8ms)  (0.5ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/216" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"216"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 216]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2475]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2475) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.190812"], ["given_name", "Greg"], ["id", 2475], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 13:28:55.293901"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.296386"], ["event", "create"], ["item_id", 2475], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2474]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2475]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2475]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.316812"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 13:28:55.316812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.323010"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.323010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2476]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.330891"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 13:28:55.330891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.337443"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.337443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2477]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.346050"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 13:28:55.346050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.352779"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.352779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2478]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.360688"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 13:28:55.360688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2479]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.369197"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 13:28:55.369197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2480]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.377636"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 13:28:55.377636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.402389"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.402389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2482"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2481]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2482' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2482]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.414154"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 13:28:55.414154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.418913"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.418913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2484"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2483]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2484' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2484]] Redirected to http://test.host/people/doe?cache_bust=1413206935 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.427970"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 13:28:55.427970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.430773"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 13:28:55.430773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"2486"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2485]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2486' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2486]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.438885"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 13:28:55.438885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.441658"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.441658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2487]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.454779"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.454779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2489]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2489]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2489) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.0ms | ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2489]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2489) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2489]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2489) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2489]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.622549"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.622549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2490]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2490]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2490]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2490) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.6ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.708916"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.708916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1962]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1962]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1962]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1962"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:55.716277"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.716277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0039" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0039"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:55.736830"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:55.736830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0039 Completed 302 Found in 6ms (ActiveRecord: 1.0ms) Started GET "/teams/group-0039" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0039"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2491]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0039' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (1963) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1962, 1963) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 1963]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1962/1963' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '1962/1963' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 1963]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.5ms | ActiveRecord: 2.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.763661"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 13:28:55.763661"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.768019"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 13:28:55.768019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"2493"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2492]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2493' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2493]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.779678"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 13:28:55.779678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.782266"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 13:28:55.782266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2495"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2494]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2495' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2495]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2495], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:55.790443"], ["updated_at", "2014-10-13 13:28:55.790443"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "afac1432-edf9-4bfd-aaf8-f35301d63a29"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.2ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 14:28:55 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd397c2b4f_fce23ff024465bf092078@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/afac1432-edf9-4bfd-aaf8-f35301d63a29?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 18ms (ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.806200"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 13:28:55.806200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.809024"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 13:28:55.809024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2497"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2496]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2497' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2497]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2497], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:55.818505"], ["updated_at", "2014-10-13 13:28:55.818505"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "c383ec5d-25da-492b-af17-3861c477479a"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 9.3ms Sent mail to someone.else@digital.justice.gov.uk (5.4ms) Date: Mon, 13 Oct 2014 14:28:55 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bd397c981c_fce23ff024465bf092148@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/c383ec5d-25da-492b-af17-3861c477479a?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 20ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.834572"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 13:28:55.834572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.837046"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 13:28:55.837046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2499"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2498]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2499' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2499]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.845243"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 13:28:55.845243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.848506"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 13:28:55.848506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2501"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2500]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2501' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2501]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.857177"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 13:28:55.857177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.859725"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 13:28:55.859725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2503"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2502]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2503' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2503]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.882476"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.882476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1964]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1964]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1964]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1964"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:55.887683"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.887683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1965]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1965]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1965]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1964/1965"], ["ancestry_depth", 2], ["created_at", "2014-10-13 13:28:55.892719"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.892719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:55.916887"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.916887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1967]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1967]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1967]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1967"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:55.921675"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:55.921675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:56.346342"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:56.346342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2504]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2504) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 43.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.1ms) Completed 200 OK in 21ms (Views: 18.9ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:56.713410"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:56.713410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1969]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1969]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1969]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1969"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:56.719280"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:56.719280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0139' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:56.721886"], ["slug", "surname-0139"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 13:28:56.721886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 13:28:56.723708"], ["group_id", 1970], ["person_id", 2505], ["updated_at", "2014-10-13 13:28:56.723708"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2505]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:56.725145' WHERE "people"."id" = 2505 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:56.725794' WHERE "groups"."id" = 1970  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:57.152864"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:57.152864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2506]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2506) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0139/edit" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0139"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0139' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2505) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1969, 1970) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1969, 1970) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2505]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.9ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0139" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0139", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1970", "leader"=>"0", "id"=>"394"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0139"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0139' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2505) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2505]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2505 AND "memberships"."id" != 394 AND "memberships"."group_id" = 1970) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1970 AND "memberships"."id" != 394 AND "memberships"."person_id" = 2505) LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0139' AND "people"."given_name" = '' AND ("people"."id" != 2505) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2505 AND "memberships"."id" != 394 AND "memberships"."group_id" = 1970) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 1970 AND "memberships"."id" != 394 AND "memberships"."person_id" = 2505) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2505 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 13:28:57.442187"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 394 [["role", "Head Honcho"], ["updated_at", "2014-10-13 13:28:57.443457"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:57.444267' WHERE "people"."id" = 2505 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:57.444928' WHERE "groups"."id" = 1970  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/surname-0139 Completed 302 Found in 19ms (ActiveRecord: 3.5ms) Started GET "/people/surname-0139" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0139"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2506]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0139' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2505) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1969, 1970) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1969, 1970) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 25.0ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2505]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 13:28:57.550881"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:57.550881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1971]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1971]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1971]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1971"], ["ancestry_depth", 1], ["created_at", "2014-10-13 13:28:57.555556"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 13:28:57.555556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:64743/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:57.979861"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 13:28:57.979861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2507]] Redirected to http://127.0.0.1:64743/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 14:28:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2507) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.4ms | ActiveRecord: 1.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 14:28:58 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 14:28:58 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 14:28:58 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"1972", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 13:28:58.259193"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 13:28:58.259193"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 13:28:58.260149"], ["group_id", 1972], ["leader", "t"], ["person_id", 2508], ["role", "Head Honcho"], ["updated_at", "2014-10-13 13:28:58.260149"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2508]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 13:28:58.261493' WHERE "people"."id" = 2508 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1972]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 13:28:58.262980' WHERE "groups"."id" = 1972  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:64743/people/taylor Completed 302 Found in 13ms (ActiveRecord: 2.1ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 14:28:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2507]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2508) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1971, 1972) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (1971, 1972) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2508]]  (0.2ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.739347"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:12.739347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2509]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.747356"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 14:18:12.747356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2510]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.751507"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 14:18:12.751507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2511]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.770227"], ["slug", "surname-0003"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 14:18:12.770227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.782442"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.782442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1973]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1973]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1973]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1973"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:12.788058"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 14:18:12.788058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.797330"], ["group_id", 1974], ["person_id", 2512], ["updated_at", "2014-10-13 14:18:12.797330"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2512]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.800190' WHERE "people"."id" = 2512 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.801067' WHERE "groups"."id" = 1974  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2512]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.806152"], ["slug", "surname-0004"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 14:18:12.806152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.812098"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.812098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1975"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:12.816750"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.816750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1975) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1975 [["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.819630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1975]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1975"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:12.824924"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.824924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.826904"], ["group_id", 1977], ["person_id", 2513], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:12.826904"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2513]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.828669' WHERE "people"."id" = 2513 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.829317' WHERE "groups"."id" = 1977  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.830613"], ["group_id", 1976], ["person_id", 2513], ["role", "Designer"], ["updated_at", "2014-10-13 14:18:12.830613"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2513]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.832014' WHERE "people"."id" = 2513 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.832596' WHERE "groups"."id" = 1976  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2513]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.847892"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.847892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1978) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1978 [["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.850945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.869680"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.869680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1979) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1979 [["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.872743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1979) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1979 [["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.875885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1979) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1979 [["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.879981"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.889400"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.889400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1980) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1980 [["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.892256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1980) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1980 [["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.895053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1980) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1980 [["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.897657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.906859"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.906859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1981) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1981 [["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.909723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1981) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1981 [["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.912507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1981) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1981 [["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.915111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 1981) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 1981 [["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.920273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.926189"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 14:18:12.926189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.930751"], ["slug", "surname-0008"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 14:18:12.930751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.938276"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 14:18:12.938276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.941170"], ["slug", "surname-0010"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 14:18:12.941170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.947471"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.947471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1982]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1982]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1982]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1982"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:12.951868"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.951868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.953162"], ["group_id", 1983], ["person_id", 2517], ["updated_at", "2014-10-13 14:18:12.953162"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.953828' WHERE "people"."id" = 2517 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.954462' WHERE "groups"."id" = 1983  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"399"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2516]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 399]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 399]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2517]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.965081' WHERE "people"."id" = 2517 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1983]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.966721' WHERE "groups"."id" = 1983  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.971867"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 14:18:12.971867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0012' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.974481"], ["slug", "surname-0012"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 14:18:12.974481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:12.980916"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.980916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1984]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1984]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1984]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1984"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:12.985510"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:12.985510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:12.986812"], ["group_id", 1985], ["person_id", 2519], ["updated_at", "2014-10-13 14:18:12.986812"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.987448' WHERE "people"."id" = 2519 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.988049' WHERE "groups"."id" = 1985  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"400"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2518]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 400]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 400]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2519]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:12.992463' WHERE "people"."id" = 2519 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 1985]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:12.993858' WHERE "groups"."id" = 1985  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 400]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.000370"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 14:18:13.000370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.003477"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 14:18:13.003477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"2521"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2520]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2521' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2521]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2521]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 12.3ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.034484"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 14:18:13.034484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.037245"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 14:18:13.037245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.043955"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.043955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1986]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1986]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1986]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1986"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.048570"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.048570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.050733"], ["group_id", 1987], ["person_id", 2523], ["updated_at", "2014-10-13 14:18:13.050733"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2523]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.052086' WHERE "people"."id" = 2523 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.052747' WHERE "groups"."id" = 1987  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2523"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2522]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2523' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2523]] Unpermitted parameters: message Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2523]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2522], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.40@digital.justice.gov.uk"], ["subject_id", 2523]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.8ms Sent mail to example.user.40@digital.justice.gov.uk (8.6ms) Date: Mon, 13 Oct 2014 15:18:13 +0100 From: support@example.com To: example.user.40@digital.justice.gov.uk Message-ID: <543bdf2511fcf_1064f3fd081c65bec648ed@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0015 has said that they believe the information on Surname-0016 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 24ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.083479"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 14:18:13.083479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.085910"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 14:18:13.085910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.092589"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.092589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1988]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1988]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1988]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1988"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.097414"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.097414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.099499"], ["group_id", 1989], ["person_id", 2525], ["updated_at", "2014-10-13 14:18:13.099499"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2525]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.100875' WHERE "people"."id" = 2525 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.101557' WHERE "groups"."id" = 1989  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2525"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2524]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2525' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2525]] Unpermitted parameters: message Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2525]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2524], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.42@digital.justice.gov.uk"], ["subject_id", 2525]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to example.user.42@digital.justice.gov.uk (1.8ms) Date: Mon, 13 Oct 2014 15:18:13 +0100 From: support@example.com To: example.user.42@digital.justice.gov.uk Message-ID: <543bdf251b0a8_1064f3fd081c65bec649c0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0017 has said that they believe the information on Surname-0018 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.116399"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 14:18:13.116399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.118899"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 14:18:13.118899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.125466"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.125466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1990]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1990]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1990"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.131349"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.131349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.133481"], ["group_id", 1991], ["person_id", 2527], ["updated_at", "2014-10-13 14:18:13.133481"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2527]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.134785' WHERE "people"."id" = 2527 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.135438' WHERE "groups"."id" = 1991  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2527"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2526]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2527' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2527]] Unpermitted parameters: message Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2527]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2526], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.44@digital.justice.gov.uk"], ["subject_id", 2527]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.44@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:18:13 +0100 From: support@example.com To: example.user.44@digital.justice.gov.uk Message-ID: <543bdf252342e_1064f3fd081c65bec650b4@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0019 has said that they believe the information on Surname-0020 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.150798"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 14:18:13.150798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.153182"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 14:18:13.153182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.159669"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.159669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1992]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1992]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1992]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1992"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.164652"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.164652"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.166807"], ["group_id", 1993], ["person_id", 2529], ["updated_at", "2014-10-13 14:18:13.166807"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2529]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.168180' WHERE "people"."id" = 2529 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.168848' WHERE "groups"."id" = 1993  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2529"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2528]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2529' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2529]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2529]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2528], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.46@digital.justice.gov.uk"], ["subject_id", 2529]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.46@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:18:13 +0100 From: support@example.com To: example.user.46@digital.justice.gov.uk Message-ID: <543bdf252b765_1064f3fd081c65bec65110@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0021 has said that they believe the information on Surname-0022 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2529]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.184508"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 14:18:13.184508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.186978"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 14:18:13.186978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.193927"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.193927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1994]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1994]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1994]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1994"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.199103"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.199103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.201172"], ["group_id", 1995], ["person_id", 2531], ["updated_at", "2014-10-13 14:18:13.201172"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2531]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.202443' WHERE "people"."id" = 2531 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.203088' WHERE "groups"."id" = 1995  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2531"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2530]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2531' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2531]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2531]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2530], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.48@digital.justice.gov.uk"], ["subject_id", 2531]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.48@digital.justice.gov.uk (1.7ms) Date: Mon, 13 Oct 2014 15:18:13 +0100 From: support@example.com To: example.user.48@digital.justice.gov.uk Message-ID: <543bdf2533ae1_1064f3fd081c65bec65298@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0023 has said that they believe the information on Surname-0024 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 8ms (ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.216963"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 14:18:13.216963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.219443"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 14:18:13.219443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2533"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2532]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2533' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2533]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.227050"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 14:18:13.227050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.229493"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 14:18:13.229493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2535"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2534]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2535' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2535]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.237855"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 14:18:13.237855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.241194"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 14:18:13.241194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2537"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2536]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2537' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2537]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.249808"], ["slug", "surname-0031"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 14:18:13.249808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.255995"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.255995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1996]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1996]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1996]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1996"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.260229"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.260229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.262584"], ["group_id", 1997], ["person_id", 2538], ["updated_at", "2014-10-13 14:18:13.262584"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.263549' WHERE "people"."id" = 2538 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.264374' WHERE "groups"."id" = 1997  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.274010"], ["slug", "surname-0032"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 14:18:13.274010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.280398"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.280398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1998]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1998]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 1998]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "1998"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.284567"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.284567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.285832"], ["group_id", 1999], ["person_id", 2539], ["updated_at", "2014-10-13 14:18:13.285832"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.286417' WHERE "people"."id" = 2539 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.287009' WHERE "groups"."id" = 1999  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.295648"], ["slug", "surname-0033"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 14:18:13.295648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.301751"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.301751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2000]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2000]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2000]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2000"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.306168"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.306168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:13.307813"], ["group_id", 2001], ["person_id", 2540], ["updated_at", "2014-10-13 14:18:13.307813"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:13.308666' WHERE "people"."id" = 2540 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:13.309390' WHERE "groups"."id" = 2001  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.318324"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.318324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2002]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2002]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2002]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2002"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.322688"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.322688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2002/2003"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.327319"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.327319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2002/2003/2004"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.332055"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.332055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2004]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2002/2003/2004"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.336703"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.336703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2002/2003"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.341287"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.341287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2003]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.351460"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.351460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2008]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2008]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2008]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2008"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.355660"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.355660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2008/2009"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.360189"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.360189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2008/2009/2010"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.366146"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.366146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2010]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2008/2009/2010"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.371006"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.371006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2009]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2008/2009"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.375609"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.375609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2009 OR "groups"."ancestry" ILIKE '2008/2009/%') OR "groups"."ancestry" = '2008/2009')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.388832"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.388832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2014]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2014]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2014]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2014"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.393467"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.393467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2014/2015"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.398221"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.398221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2014/2015/2016"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.402829"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.402829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2016]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2014/2015/2016"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:13.407402"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.407402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2015]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2014/2015"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:13.412063"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.412063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2015 OR "groups"."ancestry" ILIKE '2014/2015/%') OR "groups"."ancestry" = '2014/2015')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:13.420079"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.420079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2020]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2020]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2020]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2020"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:13.424523"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:13.424523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:13 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 9ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:13 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (30.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (215.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.2ms) Completed 200 OK in 3237ms (Views: 3235.3ms | ActiveRecord: 1.7ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:16.761084"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.761084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2022]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2022]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2022]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2022"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:16.765639"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.765639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:16.767515"], ["updated_at", "2014-10-13 14:18:16.767515"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "6d103527-6af7-4520-bc27-d5c3f62526d0"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/6d103527-6af7-4520-bc27-d5c3f62526d0" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"6d103527-6af7-4520-bc27-d5c3f62526d0"} Peoplefinder::Token Load (0.5ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '6d103527-6af7-4520-bc27-d5c3f62526d0' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:16.774902"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 14:18:16.774902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2541]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2541]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.9ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2541]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2541) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (41.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 68ms (Views: 56.6ms | ActiveRecord: 1.2ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:16.874508"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.874508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2024]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2024]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2024]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2024"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:16.879100"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.879100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:16.880960"], ["updated_at", "2014-10-13 14:18:16.880960"], ["user_email", "example.user.80@digital.justice.gov.uk"], ["value", "7e1af733-44eb-4243-94b3-8ac4c059f8ac"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/7e1af733-44eb-4243-94b3-8ac4c059f8ac" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"7e1af733-44eb-4243-94b3-8ac4c059f8ac"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '7e1af733-44eb-4243-94b3-8ac4c059f8ac' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.80@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-80' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:16.886601"], ["email", "example.user.80@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-80"], ["surname", "user"], ["updated_at", "2014-10-13 14:18:16.886601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2542]] Redirected to http://www.example.com/people/example-user-80/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/example-user-80/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-80"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2542]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-80' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2542) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:16.942576"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.942576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2026]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2026]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2026]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2026"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:16.947183"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:16.947183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:16.949804"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:18:16.949804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:16.951337"], ["updated_at", "2014-10-13 14:18:16.951337"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "66c3f3f8-5d83-4fe1-b2d7-68a41ef86fc4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/66c3f3f8-5d83-4fe1-b2d7-68a41ef86fc4" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"66c3f3f8-5d83-4fe1-b2d7-68a41ef86fc4"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '66c3f3f8-5d83-4fe1-b2d7-68a41ef86fc4' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2543]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2543]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 4ms (ActiveRecord: 1.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:16 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2543]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2543) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 29.4ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:17.005542"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.005542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2028]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2028]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2028]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2028"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:17.010044"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.010044"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:17.038563"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.038563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2030]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2030]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2030]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2030"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:17.043109"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.043109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:17.045787"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 14:18:17.045787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:17.047688"], ["updated_at", "2014-10-13 14:18:17.047688"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3e75d791-8cce-4437-86b6-7cd1af1c0b1c"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2544]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 7.2ms Sent mail to test.user@digital.justice.gov.uk (1.8ms) Date: Mon, 13 Oct 2014 15:18:17 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf29d722_1064f3fd081c65bec6533e@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/3e75d791-8cce-4437-86b6-7cd1af1c0b1c?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/3e75d791-8cce-4437-86b6-7cd1af1c0b1c?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"3e75d791-8cce-4437-86b6-7cd1af1c0b1c"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '3e75d791-8cce-4437-86b6-7cd1af1c0b1c' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2544]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2544) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 35.3ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:17.128813"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.128813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2032]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2032]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2032]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2032"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:17.133783"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:17.133783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:18:17 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:17.150047"], ["updated_at", "2014-10-13 14:18:17.150047"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "3c2078bd-4097-4ad7-9f23-0fb775c68267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 4.9ms Sent mail to james.darling@digital.justice.gov.uk (2.3ms) Date: Mon, 13 Oct 2014 15:18:17 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bdf2927147_1064f3fd081c65bec6546f@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/3c2078bd-4097-4ad7-9f23-0fb775c68267 If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 5.0ms | ActiveRecord: 0.5ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:18.551493"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:18.551493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2034]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2034]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2034]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2034"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:18.556888"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:18.556888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 8.2ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 15:18:18 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:19.092845"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:19.092845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2545]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2545) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.2ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 38.0ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.3ms) Completed 200 OK in 22ms (Views: 19.9ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2545]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:19.502296"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:19.502296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2546]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2546]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2546]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:19.553275"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:19.553275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2036]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2036]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2036]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2036"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:19.559366"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:19.559366"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:19.562793"], ["slug", "surname-0035"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 14:18:19.562793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:19.564798"], ["group_id", 2037], ["person_id", 2547], ["updated_at", "2014-10-13 14:18:19.564798"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2547]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:19.566291' WHERE "people"."id" = 2547 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:19.567068' WHERE "groups"."id" = 2037  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0035/edit" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2546]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2547) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2036, 2037) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2036, 2037) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2547]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (9.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 42.6ms | ActiveRecord: 1.7ms) Started DELETE "/memberships/409?referer=%2Fpeople%2Fsurname-0035%2Fedit" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0035/edit", "id"=>"409"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2546]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 409]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 409]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2547]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:19.627142' WHERE "people"."id" = 2547 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2037]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:19.628707' WHERE "groups"."id" = 2037  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0035/edit Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Started GET "/people/surname-0035/edit" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2546]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2547) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.5ms | ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2547]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2547]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:19.703922"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:19.703922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2038]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2038]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2038]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2038"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:19.708685"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:19.708685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:19 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:20.167956"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:20.167956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2548]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2548) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.2ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 34.8ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2039", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:20.468605"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 14:18:20.468605"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:20.469765"], ["group_id", 2039], ["leader", "t"], ["person_id", 2549], ["role", "Head Honcho"], ["updated_at", "2014-10-13 14:18:20.469765"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2549]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:20.471390' WHERE "people"."id" = 2549 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2039]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:20.473141' WHERE "groups"."id" = 2039  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/taylor Completed 302 Found in 15ms (ActiveRecord: 2.3ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2548]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2549) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2038, 2039) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2038, 2039) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 18.0ms | ActiveRecord: 1.4ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2549]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:20.578065"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:20.578065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2040]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2040]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2040]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2040"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:20.584523"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:20.584523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0036' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:20.587428"], ["slug", "surname-0036"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 14:18:20.587428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:20.589709"], ["group_id", 2041], ["person_id", 2550], ["updated_at", "2014-10-13 14:18:20.589709"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2550]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:20.591278' WHERE "people"."id" = 2550 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:20.591972' WHERE "groups"."id" = 2041  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:20 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:21.021160"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:21.021160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2551]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2551) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.2ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0036/edit" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0036"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0036' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2550) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2040, 2041) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2040, 2041) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2550]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.0ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0036" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0036", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2041", "leader"=>"0", "id"=>"411"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0036"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0036' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2550) ORDER BY groups.name Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2550]] Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2550 AND "memberships"."id" != 411 AND "memberships"."group_id" = 2041) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2041 AND "memberships"."id" != 411 AND "memberships"."person_id" = 2550) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0036' AND "people"."given_name" = '' AND ("people"."id" != 2550) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2550 AND "memberships"."id" != 411 AND "memberships"."group_id" = 2041) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2041 AND "memberships"."id" != 411 AND "memberships"."person_id" = 2550) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2550 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:21.309278"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 411 [["role", "Head Honcho"], ["updated_at", "2014-10-13 14:18:21.310480"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:21.311244' WHERE "people"."id" = 2550 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:21.311840' WHERE "groups"."id" = 2041  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/surname-0036 Completed 302 Found in 18ms (ActiveRecord: 3.2ms) Started GET "/people/surname-0036" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0036"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0036' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2550) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2040, 2041) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2040, 2041) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 14.8ms | ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2550]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:21.406780"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:21.406780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2042"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:21.412633"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:21.412633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0037' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:21.415221"], ["slug", "surname-0037"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 14:18:21.415221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:21.417058"], ["group_id", 2043], ["person_id", 2552], ["updated_at", "2014-10-13 14:18:21.417058"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2552]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:21.418653' WHERE "people"."id" = 2552 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:21.419483' WHERE "groups"."id" = 2043  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 2042) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2042 [["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:21.422670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2042]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2042"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:21.427453"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:21.427453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:21.877072"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:21.877072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2553]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2553) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0037/edit" for 127.0.0.1 at 2014-10-13 15:18:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0037"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0037' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2552) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2043) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2043) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2552]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (19.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (43.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 60ms (Views: 53.6ms | ActiveRecord: 1.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started GET "/people/add_membership?id=surname-0037" for 127.0.0.1 at 2014-10-13 15:18:22 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0037"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0037' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Completed 200 OK in 13ms (Views: 6.6ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0037" for 127.0.0.1 at 2014-10-13 15:18:23 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0037", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2043", "leader"=>"0", "id"=>"412"}, "70164859199360"=>{"role"=>"Talker", "group_id"=>"2044", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0037"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0037' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2552) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2552]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2552 AND "memberships"."id" != 412 AND "memberships"."group_id" = 2043) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2043 AND "memberships"."id" != 412 AND "memberships"."person_id" = 2552) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0037' AND "people"."given_name" = '' AND ("people"."id" != 2552) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2552 AND "memberships"."id" != 412 AND "memberships"."group_id" = 2043) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2043 AND "memberships"."id" != 412 AND "memberships"."person_id" = 2552) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2552 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:23.205602"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 412 [["role", ""], ["updated_at", "2014-10-13 14:18:23.206649"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:23.207384' WHERE "people"."id" = 2552 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:23.207980' WHERE "groups"."id" = 2043 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.208693"], ["group_id", 2044], ["person_id", 2552], ["role", "Talker"], ["updated_at", "2014-10-13 14:18:23.208693"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2552]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:23.210119' WHERE "people"."id" = 2552 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2044]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:23.211465' WHERE "groups"."id" = 2044  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/surname-0037 Completed 302 Found in 21ms (ActiveRecord: 4.2ms) Started GET "/people/surname-0037" for 127.0.0.1 at 2014-10-13 15:18:23 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0037"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0037' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2552) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2044) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2043) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2044) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2042, 2043) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.4ms | ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2552]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.307933"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 14:18:23.307933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.311318"], ["slug", "surname-0039"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 14:18:23.311318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0039"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2554]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0039' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2555) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.323934"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 14:18:23.323934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.326792"], ["slug", "surname-0041"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 14:18:23.326792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0041"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2556]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0041' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2557) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.343552"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.343552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2045]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2045]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2045]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2045"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.348772"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.348772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.353598"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 14:18:23.353598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.356717"], ["slug", "surname-0043"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 14:18:23.356717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0043"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2558]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0043' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2559) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.366712"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 14:18:23.366712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2560]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.376056"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.376056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2047]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2047]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2047"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.381387"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.381387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.386143"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 14:18:23.386143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2561]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.393196"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 14:18:23.393196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.397364"], ["slug", "surname-0047"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 14:18:23.397364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0047"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2562]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0047' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2563) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.415424"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.415424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2049]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2049]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2049]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2049"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.421450"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.421450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.428457"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 14:18:23.428457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.432768"], ["slug", "surname-0049"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 14:18:23.432768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0049"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2564]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0049' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2565) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.442785"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 14:18:23.442785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0051' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.448210"], ["slug", "surname-0051"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 14:18:23.448210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.457917"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.457917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2051]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2051]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2051]]  (1.6ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.7ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2051"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.469098"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.469098"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.471694"], ["group_id", 2052], ["person_id", 2567], ["updated_at", "2014-10-13 14:18:23.471694"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2567]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:23.473551' WHERE "people"."id" = 2567 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:23.474568' WHERE "groups"."id" = 2052  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0051"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2566]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2567) ORDER BY groups.name Completed 200 OK in 8ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.487648"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 14:18:23.487648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0053' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.490780"], ["slug", "surname-0053"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 14:18:23.490780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0053"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2568]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0053' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.1ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2569) ORDER BY groups.name Completed 200 OK in 8ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.506073"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 14:18:23.506073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.509669"], ["slug", "surname-0055"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 14:18:23.509669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0055"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2570]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0055' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2571) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2571]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 9ms (ActiveRecord: 2.0ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.526071"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 14:18:23.526071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.534341"], ["slug", "surname-0057"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 14:18:23.534341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0057"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2572]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0057' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2573) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2573]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 7ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (1.0ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.549461"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 14:18:23.549461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0059' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.555226"], ["slug", "surname-0059"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 14:18:23.555226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0059"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2574]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0059' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.1ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2575) ORDER BY groups.name  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2575]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.573723"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 14:18:23.573723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.576290"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:18:23.576290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2576]] Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 10ms (Views: 2.4ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.594272"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 14:18:23.594272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0062"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2578]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0062' LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0062' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.606631"], ["slug", "surname-0062"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 14:18:23.606631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0062 Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.612814"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 14:18:23.612814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0064"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2580]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0064' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0064' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.619612"], ["slug", "surname-0064"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 14:18:23.619612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0064 Completed 302 Found in 6ms (ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.626697"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 14:18:23.626697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0066"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2582]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0066' LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0066' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.634579"], ["slug", "surname-0066"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 14:18:23.634579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0066 Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.641618"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 14:18:23.641618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0068", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2584]] Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0068' LIMIT 1 Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0068' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.653208"], ["image", nil], ["slug", "surname-0068"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 14:18:23.653208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0068/image/edit Completed 302 Found in 12ms (ActiveRecord: 2.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.661360"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 14:18:23.661360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2586]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.673140"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 14:18:23.673140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2587]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.682456"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 14:18:23.682456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2588]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.692041"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 14:18:23.692041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2589]] Peoplefinder::Person Exists (1.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 8ms (Views: 1.2ms | ActiveRecord: 1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.711446"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.711446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2053]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2053]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2053"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.716148"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.716148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.8ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.724759"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 14:18:23.724759"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2590]] Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.737584"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 14:18:23.737584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.742168"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:18:23.742168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.746496"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:18:23.746496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2591]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2593) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 2593) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.762448"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 14:18:23.762448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.765952"], ["slug", "surname-0076"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 14:18:23.765952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0077", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0076"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2594]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0076' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2595) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0077' AND "people"."given_name" IS NULL AND ("people"."id" != 2595) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2595 [["surname", "Surname-0077"], ["updated_at", "2014-10-13 14:18:23.775276"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0076 Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2595]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.784406"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 14:18:23.784406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.788110"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 14:18:23.788110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0080", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0079"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2596]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0079' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2597) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0080' AND "people"."given_name" IS NULL AND ("people"."id" != 2597) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2597 [["surname", "Surname-0080"], ["updated_at", "2014-10-13 14:18:23.800349"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0079 Completed 302 Found in 11ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.806130"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 14:18:23.806130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.809668"], ["slug", "surname-0082"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 14:18:23.809668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0083", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0082"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2598]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0082' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2599) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0083' AND "people"."given_name" IS NULL AND ("people"."id" != 2599) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2599 [["surname", "Surname-0083"], ["updated_at", "2014-10-13 14:18:23.818460"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0082 Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.824151"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 14:18:23.824151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.827333"], ["slug", "surname-0085"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 14:18:23.827333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0086", "image"=>"#"}, "id"=>"surname-0085"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2600]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0085' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2601) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0086' AND "people"."given_name" IS NULL AND ("people"."id" != 2601) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2601]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2601 [["image", nil], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 14:18:23.837659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0085/image/edit Completed 302 Found in 9ms (ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.843995"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 14:18:23.843995"]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0088' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.850430"], ["slug", "surname-0088"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 14:18:23.850430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0088"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2602]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0088' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2603) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.863954"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 14:18:23.863954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0090' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.867183"], ["slug", "surname-0090"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 14:18:23.867183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0090"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2604]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0090' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2605) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.877959"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 14:18:23.877959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.883956"], ["slug", "surname-0092"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 14:18:23.883956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0092"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2606]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2607) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.900685"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 14:18:23.900685"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:23.905059"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 14:18:23.905059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2608]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2609) ORDER BY groups.name Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.922605"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.922605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2055]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2055]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2055]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2055"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.927962"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.927962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.933491"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 14:18:23.933491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2610]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.940362"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 14:18:23.940362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2611]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.949394"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 14:18:23.949394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2612]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.976971"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.976971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2057]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2057]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2057]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2057"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:23.981654"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:23.981654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0098' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:23.989965"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0098"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 14:18:23.989965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:23.994499"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 14:18:23.994499"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:23 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:24.017660"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:24.017660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2615]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2615]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2615]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2615) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:24.128899"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:24.128899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2059]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2059]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2059]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2059"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:24.134519"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:24.134519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0042" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0042"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:24.155501"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:24.155501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0042 Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/teams/group-0042" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0042"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2616]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0042' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2060) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2059, 2060) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2060]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (9.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2059/2060' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2059/2060' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2060]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 26.2ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:24.201514"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:24.201514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2617]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2617]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2617]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2617) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 38.5ms | ActiveRecord: 1.7ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0100' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:24.256688"], ["slug", "surname-0100"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 14:18:24.256688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:24.263864"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:24.263864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2061"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:24.268782"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:24.268782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:24.270087"], ["group_id", 2062], ["person_id", 2618], ["updated_at", "2014-10-13 14:18:24.270087"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:24.270676' WHERE "people"."id" = 2618 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:24.271338' WHERE "groups"."id" = 2062  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0043/edit" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0043"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2617]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0043' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2062) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2061, 2062) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2061]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2061) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (13.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2061/2062' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 24.3ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:24.320038"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:24.320038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:24.802866"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:24.802866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2619]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2619) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:18:24 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2063) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2063) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2063]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2063' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2063' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2063]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.8ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.9ms | ActiveRecord: 0.9ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"2063", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2063]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2063]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2063]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2063]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2063"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:25.099647"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:18:25.099647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/teams/csg Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2064) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2063, 2064) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2064]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2063/2064' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2063/2064' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2064]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 2.6ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2063]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:25.193556"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:25.193556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2620]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2620]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2620]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2620) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 43.1ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:25.255689"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:25.255689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2065]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2065]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2065]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2065"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:25.261031"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:25.261031"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2065]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2620]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2065) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2065) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2065' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2065' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.3ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:25.300659"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:25.300659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2067]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2067]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2067]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2067"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:25.306783"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:25.306783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2067/2068"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:25.312672"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:25.312672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:25.750613"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:25.750613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2621]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2621) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2069) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2067, 2068, 2069) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2069]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2067/2068/2069' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2067/2068/2069' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2069]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.7ms | ActiveRecord: 2.3ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:18:25 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2069) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2067, 2068, 2069) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2067, 2068) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2067/2068/2069' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 19.4ms | ActiveRecord: 3.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2068", "team_email_address"=>"example.user.124@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2069) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2069) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2069) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2069 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:18:26.100127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/teams/cyberdigital-cyberservices Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2069) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2067, 2068, 2069) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2069]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2067/2068/2069' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2067/2068/2069' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2069]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 2.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2069]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2068]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:26.192936"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:26.192936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2070]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2070]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2070]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2070"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:26.198164"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:26.198164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:26.684655"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:26.684655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2622]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2622) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 39.7ms | ActiveRecord: 1.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.2ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 1.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2071", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2071]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2071]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2071]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2071]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2070/2071"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:26.960231"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:18:26.960231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/teams/digital-services Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:26 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2622]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2072) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2070, 2071, 2072) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2072]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.7ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2070/2071/2072' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2070/2071/2072' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2072]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.8ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:27.058671"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:27.058671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2623]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2623]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2623]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2623) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:27.111702"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:27.111702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2073"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:27.118633"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:27.118633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0045/edit" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0045"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2623]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0045' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2074) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2073, 2074) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2073]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2073) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (11.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2073/2074' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 20.7ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:27.163185"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:27.163185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2075"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:27.169160"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:27.169160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2075/2076"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:27.175105"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:27.175105"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:27.642323"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:27.642323"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2624]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 24ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2624) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.3ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2077) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2075, 2076, 2077) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (5.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2077]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2075/2076/2077' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2075/2076/2077' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2077]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.4ms | ActiveRecord: 2.5ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2077) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2075, 2076, 2077) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2076]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2075, 2076) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2075/2076/2077' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.9ms | ActiveRecord: 2.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2075", "team_email_address"=>"example.user.131@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2077) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2077) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2077) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2075/2076/2077/%' OR "groups"."ancestry" = '2075/2076/2077')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 2077 [["ancestry", "2075"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:18:28.021805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.9ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2077) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2075, 2077) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2077]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2075/2077' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2075/2077' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2077]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.7ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2077]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2075]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.119087"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.119087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2625]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2625) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.5ms | ActiveRecord: 1.2ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:28.205064"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:18:28.205064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2078) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2078) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2078]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2078' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2078' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2078]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.3ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2625]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2078) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2078) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2078' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2078' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.9ms | ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.266394"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.266394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2626]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2626]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2626]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2626) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.7ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2626]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 17ms (Views: 14.0ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.340246"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.340246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2627]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2627]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2627]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2627) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.389078"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.389078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2079"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:28.394231"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.394231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0046/edit" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0046"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2627]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0046' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2080) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2079, 2080) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2079) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2079/2080' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.8ms | ActiveRecord: 2.2ms) Started DELETE "/teams/group-0046" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0046"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2627]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0046' ORDER BY "groups"."name" ASC LIMIT 1 SQL (1.1ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2080) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2079]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2079/2080/%' OR "groups"."ancestry" = '2079/2080')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2079/2080' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2080]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 14ms (ActiveRecord: 3.0ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2627]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2079) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2079) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2079]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2079' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2079' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2079]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 2.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2080]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.474309"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.474309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2628]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2628]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2628) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 34.3ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2628]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2628]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:28.557847"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:18:28.557847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2628]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2081) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2081) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2081]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (4.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2081' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2081' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2081]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 22ms (Views: 15.6ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.594786"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.594786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2629]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2629) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.651821"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.651821"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2082]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2082]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2082]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2082"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:28.657136"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.657136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2083) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2082, 2083) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2083]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2082/2083' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2082/2083' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2083]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.1ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.0ms | ActiveRecord: 0.6ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2083", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2083]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2083]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2083]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2083]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2082/2083"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:28.707880"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:18:28.707880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2629]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2084) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2082, 2083, 2084) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2084]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2082/2083/2084' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2082/2083/2084' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2084]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2083]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.740941"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 14:18:28.740941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.748841"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.748841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2630]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.757445"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 14:18:28.757445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.764024"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.764024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2631]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.771311"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 14:18:28.771311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2632]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.778712"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 14:18:28.778712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2633]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.0ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.797156"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 14:18:28.797156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.802227"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.802227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2635"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2634]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2635' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2635]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.813395"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 14:18:28.813395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.818299"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.818299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2637"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2636]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2637' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2637]] Redirected to http://test.host/people/doe?cache_bust=1413209908 Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.827996"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 14:18:28.827996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.831021"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 14:18:28.831021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"2639"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2638]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2639' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2639]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.838779"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 14:18:28.838779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.841185"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.841185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2640]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:28.855249"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:28.855249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2642]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2642) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:28.906568"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.906568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2087"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:28.911515"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:28.911515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2088) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2087, 2088) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2087) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2087/2088' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.5ms | ActiveRecord: 2.3ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"2087", "team_email_address"=>"example.user.138@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2088) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2087]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2088) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 2088) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2088 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 14:18:28.955218"]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:28.965867"], ["event", "update"], ["item_id", 2088], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2088\nname: original name\ncreated_at: 2014-10-13 14:18:28.911515000 Z\nupdated_at: 2014-10-13 14:18:28.911515000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '2087'\nancestry_depth: 1\nteam_email_address: example.user.138@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 22ms (ActiveRecord: 4.9ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2088) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2087, 2088) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2088]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2087/2088' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2087/2088' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2088]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.7ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:28 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2642]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.6ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2088]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 20.7ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.028605"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:29.028605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2643]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2643) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 46.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 33ms (Views: 30.2ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:29.141643"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:29.141643"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.145094"], ["event", "create"], ["item_id", 2644], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 12ms (ActiveRecord: 1.4ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2644) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2644]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.1ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/219" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"219"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 219]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2644]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2644]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2644]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.192041"], ["event", "destroy"], ["item_id", 2644], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2644\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:18:29.141643000 Z\nupdated_at: 2014-10-13 14:18:29.141643000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2644], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2643]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2644]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.2ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2644]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.2ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.218995"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:29.218995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2645]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2645) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:29.269095"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:29.269095"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2089]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2089]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2089]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2089"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:29.274474"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:29.274474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:29.277406"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:18:29.277406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.279364"], ["group_id", 2090], ["leader", "t"], ["person_id", 2646], ["role", "Jefe"], ["updated_at", "2014-10-13 14:18:29.279364"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2646]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:29.280884' WHERE "people"."id" = 2646 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:29.281567' WHERE "groups"."id" = 2090  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2646) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2089, 2090) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2089, 2090) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2646]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.1ms | ActiveRecord: 1.5ms) Started DELETE "/memberships/416?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"416"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]] Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 416]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 416]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.341874"], ["event", "destroy"], ["item_id", 416], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 416\ngroup_id: 2090\nperson_id: 2646\nrole: Jefe\ncreated_at: 2014-10-13 14:18:29.279364000 Z\nupdated_at: 2014-10-13 14:18:29.279364000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 416], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2646]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:29.346350' WHERE "people"."id" = 2646 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2090]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:29.347912' WHERE "groups"."id" = 2090  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 12ms (ActiveRecord: 2.4ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2646) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2645]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 416]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2646]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2090]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:29.418722"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:29.418722"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:29.420649"], ["event", "create"], ["item_id", 2091], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.143@digital.justice.gov.uk\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2091]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2091]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2091]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2091"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:29.426293"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:29.426293"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:29.428517"], ["event", "create"], ["item_id", 2092], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.142@digital.justice.gov.uk\nancestry:\n- \n- '2091'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:29.432576"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:18:29.432576"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:29.434506"], ["event", "create"], ["item_id", 2647], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.872950"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:29.872950"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:29.875250"], ["event", "create"], ["item_id", 2648], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2648]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2648) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.1ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:29 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2647) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 42.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"2092", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2647) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 2647) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2647 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:30.171867"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:30.175016"], ["event", "update"], ["item_id", 2647], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2647\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:18:29.432576000 Z\nupdated_at: 2014-10-13 14:18:29.432576000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:30.175939"], ["group_id", 2092], ["person_id", 2647], ["role", "Jefe"], ["updated_at", "2014-10-13 14:18:30.175939"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.177504"], ["event", "create"], ["item_id", 417], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 2092\nperson_id:\n- \n- 2647\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2647]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:30.179082' WHERE "people"."id" = 2647 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2092]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:30.181761' WHERE "groups"."id" = 2092  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/bob Completed 302 Found in 35ms (ActiveRecord: 3.4ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2647) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2091, 2092) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2091, 2092) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.2ms | ActiveRecord: 1.4ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 417]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2092]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.7ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2647]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2648]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2647]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2092]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2091]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 16.4ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.361367"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:30.361367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2649]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2649) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0109' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:30.411937"], ["slug", "surname-0109"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 14:18:30.411937"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0109/edit" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2650) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.2ms) Started PATCH "/people/surname-0109" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0109", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0109"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2650) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0109' AND "people"."given_name" = '' AND ("people"."id" != 2650) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2650]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 2650 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:30.482083"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:30.490472"], ["event", "update"], ["item_id", 2650], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2650\ngiven_name: \nsurname: Surname-0109\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:18:30.411937000 Z\nupdated_at: 2014-10-13 14:18:30.411937000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2650\n given_name: ''\n surname: Surname-0109\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 14:18:30.482083000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0109\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2650\n given_name: ''\n surname: Surname-0109\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 14:18:30.411937000 Z\n updated_at: &2 2014-10-13 14:18:30.482083000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0109\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2650\n given_name: ''\n surname: Surname-0109\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0109\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70164853046820\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2650\n given_name: ''\n surname: Surname-0109\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0109\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413209910-67151-7593\n cache_id: 1413209910-67151-7593\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413209910-67151-7593/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70164853042960\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 2650\n given_name: ''\n surname: Surname-0109\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0109\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413209910-67151-7593\n cache_id: 1413209910-67151-7593\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413209910-67151-7593/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413209910-67151-7593\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413209910-67151-7593/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0109/image/edit Completed 302 Found in 28ms (ActiveRecord: 3.1ms) Started GET "/people/surname-0109/image/edit" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0109"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0109' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 24.6ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2649]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2650]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 14ms (Views: 10.8ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.554805"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:30.554805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2651]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2651) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 16ms (Views: 13.4ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:30.631041"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 14:18:30.631041"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.633450"], ["event", "create"], ["item_id", 2093], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2093) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2093) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2093]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2093' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2093' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2093]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2651]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2093]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.679073"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:30.679073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2652]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 2.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2652) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.4ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:30.732637"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 14:18:30.732637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2653) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2653) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 2653) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2653 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 14:18:30.794168"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:30.799836"], ["event", "update"], ["item_id", 2653], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2653\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:18:30.732637000 Z\nupdated_at: 2014-10-13 14:18:30.732637000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 18ms (ActiveRecord: 2.3ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2653) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 9.2ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2653]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.1ms | ActiveRecord: 0.9ms) Started POST "/audit_trail/undo/230" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"230"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 230]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2653]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2653) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.4ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2653 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 14:18:30.859770"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:30.863465"], ["event", "update"], ["item_id", 2653], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2653\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:18:30.732637000 Z\nupdated_at: 2014-10-13 14:18:30.794168000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2652]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2653]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2653]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2653]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.888241"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:30.888241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2654]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2654) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:30.940271"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:30.940271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2094"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:30.946119"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:30.946119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2095) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2094, 2095) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2094) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (12.7ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2094/2095' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 29ms (Views: 21.6ms | ActiveRecord: 2.8ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2095) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2094]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2094/2095/%' OR "groups"."ancestry" = '2094/2095')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2094/2095' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2095]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:30.991970"], ["event", "destroy"], ["item_id", 2095], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2095\nname: original name\ncreated_at: 2014-10-13 14:18:30.946119000 Z\nupdated_at: 2014-10-13 14:18:30.946119000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '2094'\nancestry_depth: 1\nteam_email_address: example.user.144@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2095], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 12ms (ActiveRecord: 2.6ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:18:30 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2094) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2094) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2094]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2094' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2094' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2094]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2654]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2095]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:31.039905"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:31.039905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2655]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2655) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.7ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:31.089093"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:18:31.089093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2656) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.9ms | ActiveRecord: 1.6ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2656) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2656]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:31.144521"], ["event", "destroy"], ["item_id", 2656], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2656\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:18:31.089093000 Z\nupdated_at: 2014-10-13 14:18:31.089093000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.4ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2656], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 11ms (ActiveRecord: 2.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 15.4ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2656]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 7.8ms | ActiveRecord: 1.3ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/233" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"233"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 233]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2656]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2656) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:31.089093"], ["given_name", "Greg"], ["id", 2656], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:18:31.196309"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:31.200604"], ["event", "create"], ["item_id", 2656], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:18:31 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2655]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2656]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2656]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.8ms)  (0.4ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0110' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:31.501787"], ["image", "placeholder.png"], ["slug", "surname-0110"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 14:18:31.501787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0111' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:32.252772"], ["image", "placeholder.png"], ["slug", "surname-0111"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 14:18:32.252772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:32.373772"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.373772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2096]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2096]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2096]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2096"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:32.379328"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.379328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2097]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2097]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2097]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2096/2097"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:32.385085"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.385085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (8.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.408219"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:32.408219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2659]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2659]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2659]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2659) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 41.7ms | ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2659]] Peoplefinder::Person Load (1.0ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2659) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (53.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 75ms (Views: 64.6ms | ActiveRecord: 2.4ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2659]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2659) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2659]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2659]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.582183"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:32.582183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2660]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2660]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2660]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2660) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.4ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:32.636076"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.636076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2099"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:32.642106"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.642106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2100]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2100]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2100]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2099/2100"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:32.648761"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.648761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2099]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2099"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:32.657354"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.657354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2102]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2102]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2102]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2099/2102"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:32.667319"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:32.667319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0112' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:32.670780"], ["slug", "surname-0112"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 14:18:32.670780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:32.672599"], ["group_id", 2101], ["person_id", 2661], ["updated_at", "2014-10-13 14:18:32.672599"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:32.673334' WHERE "people"."id" = 2661 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:32.674003' WHERE "groups"."id" = 2101  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:32.675616"], ["group_id", 2103], ["person_id", 2661], ["updated_at", "2014-10-13 14:18:32.675616"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:32.676334' WHERE "people"."id" = 2661 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:32.677142' WHERE "groups"."id" = 2103  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2660]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2103) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2099, 2102, 2103) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2103]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2099/2102/2103' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2099/2102/2103' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2103]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 15.4ms | ActiveRecord: 2.3ms) Started GET "/people/surname-0112" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0112"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2660]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0112' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2661) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2103]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2099, 2100, 2101) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2099, 2102, 2103) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2099, 2100, 2101) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2099, 2102, 2103) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.739903"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:32.739903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2662]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2662]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2662]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2662) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0113' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.792414"], ["slug", "surname-0113"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 14:18:32.792414"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0113" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0113"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2662]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0113' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2663) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.819324"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:32.819324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2664]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2664]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2664]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2664) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 41ms (Views: 36.3ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0114' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:32.869565"], ["slug", "surname-0114"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 14:18:32.869565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0114" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0114"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2664]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0114' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2665) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:32.899835"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:32.899835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2666]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2666) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.4ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0115' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:32.950680"], ["slug", "surname-0115"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 14:18:32.950680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0115/edit" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0115"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0115' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2667) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 30.9ms | ActiveRecord: 1.2ms) Started DELETE "/people/surname-0115" for 127.0.0.1 at 2014-10-13 15:18:32 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0115"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0115' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2667) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2667]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2666]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2667]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.028088"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.028088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2668]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2668) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 34.0ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:33.094560"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:33.094560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2669) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 0.9ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2669) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.4ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2669) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 2669) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 2669 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.176094"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2668]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2669) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.210646"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.210646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2670]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2670]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2670]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2670) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 42ms (Views: 37.1ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2670]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 32.5ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2670]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 26.8ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.351328"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.351328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2671]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2671) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:33.403002"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:33.403002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2104]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2104]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2104]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2104"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:33.408034"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:33.408034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0116' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:33.411734"], ["slug", "surname-0116"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 14:18:33.411734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:33.414708"], ["group_id", 2105], ["person_id", 2672], ["updated_at", "2014-10-13 14:18:33.414708"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2672]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:33.416365' WHERE "people"."id" = 2672 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:33.417085' WHERE "groups"."id" = 2105  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0116" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0116"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2672) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2104, 2105) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2104, 2105) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.3ms) Started GET "/people/surname-0116/reported_profiles/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0116"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 12.9ms | ActiveRecord: 0.7ms) Started POST "/people/surname-0116/reported_profiles" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0116"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2672]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 2671], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.154@digital.justice.gov.uk"], ["subject_id", 2672]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.5ms Sent mail to example.user.154@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:18:33 +0100 From: support@example.com To: example.user.154@digital.justice.gov.uk Message-ID: <543bdf3972734_1064f3fd081c65bec655f8@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0116 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0116 Redirected to http://www.example.com/people/surname-0116 Completed 302 Found in 10ms (ActiveRecord: 1.1ms) Started GET "/people/surname-0116" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0116"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2671]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2672) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2104, 2105) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2104, 2105) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.497419"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.497419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2673]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2673) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.4ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.8ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:33.611832"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:33.611832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 14ms (ActiveRecord: 1.4ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.3ms | ActiveRecord: 0.7ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2674) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.3ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2673]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2674) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 38.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.707854"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.707854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2675]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2675) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.6ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 32.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:33.822447"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:33.822447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2676) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2675]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2676) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 39.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:33.907976"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:33.907976"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2677]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2677) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 34.6ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:33.958798"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:33.958798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:33 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 30.2ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2678]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.9ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2677]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (20.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 25.5ms | ActiveRecord: 0.3ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:34.076017"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:34.076017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2679]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2679]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2679]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2679) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0117' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:34.128021"], ["slug", "surname-0117"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 14:18:34.128021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0117/edit" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0117"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2679]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0117' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2680) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:34.183897"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:34.183897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2681]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2681]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2681]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2681) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0118' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:34.229480"], ["slug", "surname-0118"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 14:18:34.229480"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:34.238458"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:34.238458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2106]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2106]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2106]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0048-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2106"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:34.243607"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:34.243607"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:34.245028"], ["group_id", 2107], ["person_id", 2682], ["updated_at", "2014-10-13 14:18:34.245028"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:34.245766' WHERE "people"."id" = 2682 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:34.246405' WHERE "groups"."id" = 2107  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0118/edit" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0118"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2681]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0118' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2682) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2106, 2107) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2106, 2107) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2682]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 47ms (Views: 40.2ms | ActiveRecord: 1.8ms) Started DELETE "/people/surname-0118" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0118"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2681]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0118' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2682) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 421]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2682]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:34.310634' WHERE "people"."id" = 2682 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:34.311737' WHERE "groups"."id" = 2107 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2682]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 14ms (ActiveRecord: 3.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2681]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.4ms | ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 421]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2682]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:34.341388"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:34.341388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2683]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2683]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2683]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2683) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 48ms (Views: 43.0ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:34.406151"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:34.406151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2683]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2684) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 1.1ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2683]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2684) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2683]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2684) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 30.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:34.529417"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:34.529417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2685]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2685]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2685]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2685) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (44.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 59ms (Views: 54.0ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2685]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.3ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:34.639424"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:34.639424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2686]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2686) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:34.687716"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:34.687716"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:34.690618"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:18:34.690618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2688) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.0ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2688) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 2688) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2687]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 11.0ms | ActiveRecord: 1.8ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2688) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2688 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:34.779181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2686]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2688) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:34.811681"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:34.811681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2108]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2108]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2108]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2108"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:34.817651"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:34.817651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:34 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:35.275018"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:35.275018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2689]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2689) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.0ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.3ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2109", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:18:35.621797"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:35.621797"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:35.622959"], ["group_id", 2109], ["person_id", 2690], ["role", ""], ["updated_at", "2014-10-13 14:18:35.622959"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2690]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:35.624338' WHERE "people"."id" = 2690 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2109]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:35.626266' WHERE "groups"."id" = 2109  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/marco-polo/image/edit Completed 302 Found in 20ms (ActiveRecord: 2.3ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 11ms (Views: 8.5ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65098/people/marco-polo?cache_bust=1413209915 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413209915" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413209915", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2689]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2690) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2108, 2109) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2108, 2109) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.7ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:35.845310"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:35.845310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2110]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2110]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2110]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2110"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:35.851025"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:35.851025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0119' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:35.854029"], ["slug", "surname-0119"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 14:18:35.854029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 16.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:36.309661"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:36.309661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2692]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2692) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.7ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0119/edit" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2691) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0119" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0119", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2110", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0119"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2691) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0119' AND "people"."given_name" = '' AND ("people"."id" != 2691) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 2691 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:36.642721"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:36.643880"], ["group_id", 2110], ["person_id", 2691], ["role", ""], ["updated_at", "2014-10-13 14:18:36.643880"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2691]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:36.645436' WHERE "people"."id" = 2691 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2110]] SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:36.647037' WHERE "groups"."id" = 2110  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/surname-0119 Completed 302 Found in 17ms (ActiveRecord: 3.1ms) Started GET "/people/surname-0119" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2691) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2110) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2110) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.1ms | ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0119/edit" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0119"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0119' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2691) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2110) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2110) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2691]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 44.1ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:36.869076"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:36.869076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2112]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2112]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2112]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2112"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:36.873958"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:36.873958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:36.877272"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:36.877272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:36 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:37.340023"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:37.340023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2694]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2694) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.8ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 37.3ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2113", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2693]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 10.2ms | ActiveRecord: 1.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2113"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413209917-67151-6357/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:18:37.764898"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:37.764898"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:37.766172"], ["group_id", 2113], ["person_id", 2695], ["role", ""], ["updated_at", "2014-10-13 14:18:37.766172"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2695]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:37.767934' WHERE "people"."id" = 2695 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2113]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:37.769466' WHERE "groups"."id" = 2113  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65098/people/marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63/image/edit Completed 302 Found in 17ms (ActiveRecord: 2.3ms) Started GET "/people/marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63/image/edit" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.6ms) Started PUT "/people/marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63/image" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65098/people/marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63?cache_bust=1413209917 Completed 302 Found in 9ms (ActiveRecord: 1.1ms) Started GET "/people/marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63?cache_bust=1413209917" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413209917", "id"=>"marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2694]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-a36f27c0-1200-41c5-88f2-a8c46cfeac63' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2695) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2112, 2113) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2112, 2113) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 1.4ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:37.986075"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:37.986075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2696]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2696]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 17ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2696]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2696) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.045336"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 14:18:38.045336"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2697]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2697 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:38.051490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.065161"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.065161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2114]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2114]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2114"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:38.070858"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.070858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:38.073076"], ["group_id", 2115], ["person_id", 2697], ["updated_at", "2014-10-13 14:18:38.073076"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2697]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:38.075358' WHERE "people"."id" = 2697 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:38.076321' WHERE "groups"."id" = 2115  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2696]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2697) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2114, 2115) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2114, 2115) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 14.6ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:38.111326"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:38.111326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2698]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2698]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2698]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2698) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.160592"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 14:18:38.160592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 2699 [["email", nil], ["updated_at", "2014-10-13 14:18:38.161911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2698]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2699) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:38.190466"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:38.190466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2700]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2700) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 42ms (Views: 36.4ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.242100"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 14:18:38.242100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2701) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 1.1ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 2.1ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 2701], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:38.294419"], ["updated_at", "2014-10-13 14:18:38.294419"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "db31655d-f318-4c31-9360-5680d59892bd"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 6.0ms Sent mail to someone.else@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:18:38 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdf3e4966b_1064f3fd081c65bec656e4@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/db31655d-f318-4c31-9360-5680d59892bd?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 13ms (ActiveRecord: 1.4ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2700]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2701) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:38.328705"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:38.328705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2702]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2702]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2702]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2702) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.3ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.382180"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-1ac4d3c6-8eb1-4995-a602-0988e43f21ac"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 14:18:38.382180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-1ac4d3c6-8eb1-4995-a602-0988e43f21ac" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-1ac4d3c6-8eb1-4995-a602-0988e43f21ac"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2702]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-1ac4d3c6-8eb1-4995-a602-0988e43f21ac' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2703) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.5ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:38.415522"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:38.415522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2704]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2704]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2704]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2704) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.465300"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-3d644d1b-710a-4a97-8e7f-dab74fd83681"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 14:18:38.465300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2705]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 2705 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:18:38.470845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.482598"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.482598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2116]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2116]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2116"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:38.487639"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.487639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:38.489935"], ["group_id", 2117], ["person_id", 2705], ["updated_at", "2014-10-13 14:18:38.489935"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2705]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:38.491523' WHERE "people"."id" = 2705 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:38.492237' WHERE "groups"."id" = 2117  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-3d644d1b-710a-4a97-8e7f-dab74fd83681" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-3d644d1b-710a-4a97-8e7f-dab74fd83681"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2704]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3d644d1b-710a-4a97-8e7f-dab74fd83681' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2705) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2116, 2117) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2116, 2117) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 27.5ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.538042"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 14:18:38.538042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.545042"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.545042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2706]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:38.561565"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.561565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2119]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2119]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2119"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:38.569804"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.569804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2120]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2120]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2120]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2119/2120"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:38.576904"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.576904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2121]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2121]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2121]]  (0.6ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2119/2120/2121"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:38.584864"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:38.584864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:38 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 8ms (Views: 7.9ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.030581"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.030581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2707]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2707]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2707) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.9ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.285626"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.285626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2708]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2708]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2708]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2708) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.340270"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.340270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2123"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.345961"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.345961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2124]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2124]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2124]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2123/2124"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:39.351771"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.351771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2125]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2125]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2125]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2123/2124/2125"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:39.357731"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.357731"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2123) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2123 [["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.361136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2123"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.367600"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.367600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2708]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2127) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2123, 2127) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2127]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2123/2127' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2123/2127' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2127]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.0ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2708]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2127) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2123, 2127) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2123]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2123) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2123/2127' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.1ms | ActiveRecord: 2.4ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2708]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2127) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2123, 2127) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2127 OR "groups"."ancestry" ILIKE '2123/2127/%') OR "groups"."ancestry" = '2123/2127')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.2ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2127) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 3.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.448177"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.448177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2709]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2709]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2709) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.500698"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.500698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2128]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2128]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2128]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2128"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.507013"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.507013"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2129]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2128/2129"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:39.512623"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.512623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2130]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2130]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2130]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2128/2129/2130"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:39.518263"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.518263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.521218"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:18:39.521218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.522986"], ["group_id", 2129], ["person_id", 2710], ["updated_at", "2014-10-13 14:18:39.522986"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.523652' WHERE "people"."id" = 2710 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.524334' WHERE "groups"."id" = 2129  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.527178"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:18:39.527178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.528767"], ["group_id", 2129], ["person_id", 2711], ["updated_at", "2014-10-13 14:18:39.528767"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.529415' WHERE "people"."id" = 2711 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.530002' WHERE "groups"."id" = 2129  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.532501"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:18:39.532501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.534068"], ["group_id", 2129], ["person_id", 2712], ["updated_at", "2014-10-13 14:18:39.534068"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.534655' WHERE "people"."id" = 2712 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.535253' WHERE "groups"."id" = 2129  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2129) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2128, 2129) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2129]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2128/2129' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2128/2129' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2128/2129' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.568855"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.568855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2713]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2713]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2713]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2713) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.623596"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.623596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2132]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2132]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2132]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2132"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.628799"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.628799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2133]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2133]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2133]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2132/2133"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:39.634952"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.634952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2134]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2134]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2134]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2132/2133/2134"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:39.640285"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.640285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.643658"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:18:39.643658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.645336"], ["group_id", 2133], ["person_id", 2714], ["updated_at", "2014-10-13 14:18:39.645336"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.646042' WHERE "people"."id" = 2714 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.646777' WHERE "groups"."id" = 2133  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.649715"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:18:39.649715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.651345"], ["group_id", 2133], ["person_id", 2715], ["updated_at", "2014-10-13 14:18:39.651345"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.651952' WHERE "people"."id" = 2715 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.652558' WHERE "groups"."id" = 2133  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.655052"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:18:39.655052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.656569"], ["group_id", 2133], ["person_id", 2716], ["updated_at", "2014-10-13 14:18:39.656569"]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.657172' WHERE "people"."id" = 2716 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.658283' WHERE "groups"."id" = 2133  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2713]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2133) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2132, 2133) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2133]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2132/2133' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2132/2133' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2132/2133' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2713]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2133) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2132, 2133) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Group Load (0.5ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2133 OR "groups"."ancestry" ILIKE '2132/2133/%') OR "groups"."ancestry" = '2132/2133')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.9ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2135,2134,2133) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.733869"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.733869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2717]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2717]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2717]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2717) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.9ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.790527"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.790527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2136]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2136]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2136]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2136"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.796577"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.796577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2137]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2137]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2137]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2136/2137"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:39.802149"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.802149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2138]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2138]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2138]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2136/2137/2138"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:39.806755"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.806755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.809900"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:18:39.809900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.811791"], ["group_id", 2139], ["person_id", 2718], ["updated_at", "2014-10-13 14:18:39.811791"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.812746' WHERE "people"."id" = 2718 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.813533' WHERE "groups"."id" = 2139  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.817601"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:18:39.817601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.819570"], ["group_id", 2139], ["person_id", 2719], ["updated_at", "2014-10-13 14:18:39.819570"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.820268' WHERE "people"."id" = 2719 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.820940' WHERE "groups"."id" = 2139  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.823349"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:18:39.823349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:39.824908"], ["group_id", 2139], ["person_id", 2720], ["updated_at", "2014-10-13 14:18:39.824908"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:39.825641' WHERE "people"."id" = 2720 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:39.826195' WHERE "groups"."id" = 2139  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2717]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2139) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2136, 2137, 2138, 2139) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2139]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2136/2137/2138/2139' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2136/2137/2138/2139' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2139]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 15.4ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:39.871415"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:39.871415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2721]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2721]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2721]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2721) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:39.924070"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.924070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2140]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2140]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2140]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2140"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:39.929553"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.929553"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2141]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2141]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2141]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2140/2141"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:39.936469"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.936469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2142]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2142]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2142]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2140/2141/2142"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:39.943238"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:39.943238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2721]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2140) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2140) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2140]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.7ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (1.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 26ms (Views: 19.0ms | ActiveRecord: 2.3ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2721]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2141) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2140, 2141) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2141]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.2ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 15:18:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2721]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2142) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2140, 2141, 2142) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2142]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141/2142' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141/2142' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2140/2141/2142' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:40.024132"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:40.024132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2722]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2722]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2722]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2722) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 33.6ms | ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.075907"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.075907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2144]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2144]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2144]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2144"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:40.080589"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.080589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2145]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2145]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2145]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2144/2145"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:40.086384"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.086384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2146]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2146]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2146]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2144/2145/2146"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:40.092335"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.092335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2722]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2147) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2144, 2145, 2146, 2147) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2147]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2144/2145/2146/2147' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2144/2145/2146/2147' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2147]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.4ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.131430"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.131430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2148]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2148]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2148]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2148"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:40.137722"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.137722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2149]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2149]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2149]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2148/2149"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:40.143549"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.143549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2150]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2150]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2150]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2148/2149/2150"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:40.150721"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.150721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65098/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:40.592570"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:40.592570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2723]] Redirected to http://127.0.0.1:65098/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2723) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 48.2ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:18:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2151) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2148, 2149, 2150, 2151) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2151]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2148/2149/2150/2151' ORDER BY "groups"."name" ASC CACHE (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2148/2149/2150/2151' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2151]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0126' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.917649"], ["slug", "surname-0126"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 14:18:40.917649"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0127' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.920907"], ["slug", "surname-0127"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 14:18:40.920907"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 2725 [["updated_at", "2014-10-13 14:18:40.922036"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:40.925438"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 14:18:40.925438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:40.930073"], ["updated_at", "2014-10-13 14:18:40.930073"], ["user_email", "example.user.203@digital.justice.gov.uk"], ["value", "f6a7622e-80ed-44b8-86b2-9e7eca4e52ad"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:40.933372"], ["updated_at", "2014-10-13 14:18:40.933372"], ["user_email", "example.user.204@digital.justice.gov.uk"], ["value", "beb3424e-3075-4e83-a545-38a60556dcc9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 171]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.939799"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 14:18:40.939799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:40.941445"], ["updated_at", "2014-10-13 14:18:40.941445"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "0a877f9c-ae90-469c-ade8-34c450787ac6"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.944950"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 14:18:40.944950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.953550"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.953550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2152]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2152]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2152]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2152"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:40.958278"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.958278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2728]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0051' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2153) ORDER BY people.surname Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.971091"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 14:18:40.971091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.974373"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.974373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2154]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2154]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2154]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2154"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:40.979146"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:40.979146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0053"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2729]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0053' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2155) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2154]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2154]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2154/2155/%' OR "groups"."ancestry" = '2154/2155')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2154/2155' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2155]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0052 Completed 302 Found in 9ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:40.994004"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 14:18:40.994004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.001318"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.001318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2156]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2156]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2156]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2156"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.006021"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.006021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2730]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0054' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2157) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2156]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2156]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2156/2157/%' OR "groups"."ancestry" = '2156/2157')) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2156/2157' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2157]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.4ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.021576"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 14:18:41.021576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.028565"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.028565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2158]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2158]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2158]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0055-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0055' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0055' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2158"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.033697"], ["name", "Group-0055"], ["slug", "group-0055"], ["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.033697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0055"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2731]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0055' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2159) ORDER BY people.surname Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.046531"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 14:18:41.046531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2732]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.060105"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 14:18:41.060105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2733]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.072445"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 14:18:41.072445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2734]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.082450"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 14:18:41.082450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0056", "team_email_address"=>"example.user.214@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2735]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0056' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.089548"], ["name", "Group-0056"], ["slug", "group-0056"], ["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.089548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0056 Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.3ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.096157"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 14:18:41.096157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0057", "team_email_address"=>"example.user.215@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2736]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.103307"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.103307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0057 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.108140"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 14:18:41.108140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0058", "team_email_address"=>"example.user.216@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2737]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.116802"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.116802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0058 Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.125738"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 14:18:41.125738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2738]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.135723"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 14:18:41.135723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.143749"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.143749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2739]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 3ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.152142"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 14:18:41.152142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.158334"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.158334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2164]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2164]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2164]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2164"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.163255"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.163255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2740]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.173748"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 14:18:41.173748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.182054"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.182054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0060-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0060' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0060' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2166"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.186265"], ["name", "Group-0060"], ["slug", "group-0060"], ["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.186265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0060"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2741]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0060' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2167) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2166]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2167) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2167) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 1.2ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.203825"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 14:18:41.203825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.211223"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.211223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0061-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0061' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0061' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2168"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.217990"], ["name", "Group-0061"], ["slug", "group-0061"], ["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.217990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0061"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2742]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0061' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2169) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2168]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2169) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2169) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.236378"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 14:18:41.236378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.244188"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.244188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0062-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0062' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2170"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.249032"], ["name", "Group-0062"], ["slug", "group-0062"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.249032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0062"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2743]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0062' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2171) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2170]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2171) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2171) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.268021"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 14:18:41.268021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.276124"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.276124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2172"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.282155"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.282155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0064", "team_email_address"=>"example.user.228@digital.justice.gov.uk"}, "id"=>"group-0063"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2744]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0063' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2173) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2172]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2173) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0064' AND "groups"."id" != 2173) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 2173 [["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.297638"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0064 Completed 302 Found in 14ms (ActiveRecord: 3.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2173]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.304640"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 14:18:41.304640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.312000"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.312000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2174]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2174]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2174]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2174"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.317934"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.317934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0065", "team_email_address"=>"example.user.229@digital.justice.gov.uk"}, "id"=>"group-0065"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2745]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0065' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2175) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0065' AND "groups"."id" != 2175) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0065 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.330595"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 14:18:41.330595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.339268"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.339268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2176]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2176]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2176]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2176"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.344009"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.344009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0066", "team_email_address"=>"example.user.231@digital.justice.gov.uk"}, "id"=>"group-0066"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2746]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0066' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2177) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0066' AND "groups"."id" != 2177) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0066 Completed 302 Found in 8ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.358523"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 14:18:41.358523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2747]] Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.367665"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 14:18:41.367665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2748]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.393404"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.393404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:41.401285"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:41.401285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2749]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2749]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2749]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2749) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2749]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 11ms (Views: 7.4ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.468732"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 14:18:41.468732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0152' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.471499"], ["slug", "surname-0152"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 14:18:41.471499"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.473439"], ["event", "create"], ["item_id", 2751], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0152\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.495530"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.495530"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.497770"], ["event", "create"], ["item_id", 2179], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.235@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2179]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2179]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2179]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0067-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0067' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0067' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2179"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.502515"], ["name", "Group-0067"], ["slug", "group-0067"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.502515"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.505495"], ["event", "create"], ["item_id", 2180], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0067\nteam_email_address:\n- \n- example.user.234@digital.justice.gov.uk\nancestry:\n- \n- '2179'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.507373"], ["group_id", 2180], ["person_id", 2751], ["updated_at", "2014-10-13 14:18:41.507373"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.509108"], ["event", "create"], ["item_id", 436], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 2751\ngroup_id:\n- \n- 2180\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.509791' WHERE "people"."id" = 2751 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.510518' WHERE "groups"."id" = 2180  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 436]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.512512"], ["event", "destroy"], ["item_id", 436], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 436\ngroup_id: 2180\nperson_id: 2751\nrole: \ncreated_at: &1 2014-10-13 14:18:41.507373000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 436], ["item_type", "Peoplefinder::Membership"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.514591' WHERE "people"."id" = 2751 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.515404' WHERE "groups"."id" = 2180  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"239"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2750]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 239]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 436]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.524828"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 14:18:41.524828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0154' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.528049"], ["slug", "surname-0154"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 14:18:41.528049"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.529953"], ["event", "create"], ["item_id", 2753], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0154\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"240"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2752]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 240]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2753]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2753]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2753]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:41.539037"], ["event", "destroy"], ["item_id", 2753], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2753\ngiven_name: \nsurname: Surname-0154\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:18:41.528049000 Z\nupdated_at: 2014-10-13 14:18:41.528049000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0153"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2753], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2753]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.545507"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 14:18:41.545507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.548254"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:18:41.548254"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.551091"], ["event", "create"], ["item_id", 2755], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2755]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2755]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.555876"], ["event", "destroy"], ["item_id", 2755], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 2755\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:18:41.548254000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2755], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"243"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2754]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 243]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2755]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 2755) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.548254"], ["id", 2755], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:18:41.564753"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:41.566747"], ["event", "create"], ["item_id", 2755], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.573289"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 14:18:41.573289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0157' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.575957"], ["slug", "surname-0157"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 14:18:41.575957"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.577414"], ["event", "create"], ["item_id", 2757], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0157\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.584740"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.584740"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.586339"], ["event", "create"], ["item_id", 2181], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.237@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2181]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2181]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2181]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0068-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0068' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0068' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2181"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.591167"], ["name", "Group-0068"], ["slug", "group-0068"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.591167"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.593201"], ["event", "create"], ["item_id", 2182], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0068\nteam_email_address:\n- \n- example.user.236@digital.justice.gov.uk\nancestry:\n- \n- '2181'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.594612"], ["group_id", 2182], ["person_id", 2757], ["updated_at", "2014-10-13 14:18:41.594612"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.596073"], ["event", "create"], ["item_id", 437], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 2757\ngroup_id:\n- \n- 2182\n"]] SQL (0.8ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.597419' WHERE "people"."id" = 2757 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.599623' WHERE "groups"."id" = 2182  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"248"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2756]] Peoplefinder::Version Load (0.1ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 248]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 437]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.618460"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.618460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2183]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2183]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2183]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0069-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0069' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2183"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.622581"], ["name", "Group-0069"], ["slug", "group-0069"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.622581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2184]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2184]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2184]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0070-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0070' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2183/2184"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.627313"], ["name", "Group-0070"], ["slug", "group-0070"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.627313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2185]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2185]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2185]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0071-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2183/2184/2185"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:41.633096"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.633096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0069' AND "groups"."id" != 2184) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.638194"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.638194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2187]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2187]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2187]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0073' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2187"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.643306"], ["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.643306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2188]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2188]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2188]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2187/2188"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.648554"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.648554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2189]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2189]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2189]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2187/2188/2189"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:18:41.653857"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.653857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2187, 2188, 2189, 2190) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.659188"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.659188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2191) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.668429"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.668429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2192]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2192]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2192]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0077-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2192"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.672877"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.672877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.680945"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.680945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2194]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2194]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2194]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2194"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.687903"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.687903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2194/2195' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2195]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.699610"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.699610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2196]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2196]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2196]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2196"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.704426"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.704426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0158' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.707516"], ["slug", "surname-0158"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 14:18:41.707516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.709085"], ["group_id", 2197], ["person_id", 2758], ["updated_at", "2014-10-13 14:18:41.709085"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.709742' WHERE "people"."id" = 2758 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2197]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.711826' WHERE "groups"."id" = 2197  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2196/2197' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2197]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.724133"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.724133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2198]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2198]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0080-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2198"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.729816"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.729816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0159' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.734756"], ["slug", "surname-0159"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 14:18:41.734756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.736459"], ["group_id", 2199], ["person_id", 2759], ["updated_at", "2014-10-13 14:18:41.736459"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.737089' WHERE "people"."id" = 2759 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2199]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.738377' WHERE "groups"."id" = 2199  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2198/2199' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2199]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.749315"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.749315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2200]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2200]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2200]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0081-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2200"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.754022"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.754022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2201]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2201]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2201]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0082-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2200/2201"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.759026"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.759026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2201]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2200/2201' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.769577"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.769577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2203"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.774036"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.774036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2203) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2203 [["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.776944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2203]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2203"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.783986"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.783986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.791217"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.791217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2206"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.795374"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.795374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2206) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2206 [["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.798430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2206"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.804798"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.804798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2206) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2206 [["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.808081"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2206]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2206"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.813577"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.813577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.822274"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.822274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2210]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2210]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2210]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2210"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.827091"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.827091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.836064"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.836064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2212"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.840822"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.840822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2212]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2213) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 2213) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 2213 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 14:18:41.845431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2213]]  (0.1ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.854839"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.854839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2214]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2214]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2214]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2214"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.860284"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.860284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.863915"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:18:41.863915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.867145"], ["group_id", 2215], ["person_id", 2760], ["updated_at", "2014-10-13 14:18:41.867145"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.867899' WHERE "people"."id" = 2760 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2215]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.869219' WHERE "groups"."id" = 2215  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2215 OR "groups"."ancestry" ILIKE '2214/2215/%') OR "groups"."ancestry" = '2214/2215')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2215) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.878196"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.878196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2216]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2216]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2216]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2216"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.883799"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.883799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.887218"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:18:41.887218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.889098"], ["group_id", 2217], ["person_id", 2761], ["updated_at", "2014-10-13 14:18:41.889098"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.889726' WHERE "people"."id" = 2761 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2217]] SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.891497' WHERE "groups"."id" = 2217  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2217]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2217]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2217]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2216/2217"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.900332"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.900332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.904739"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:18:41.904739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.906750"], ["group_id", 2218], ["person_id", 2762], ["updated_at", "2014-10-13 14:18:41.906750"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.907452' WHERE "people"."id" = 2762 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2218]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.908819' WHERE "groups"."id" = 2218  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2217 OR "groups"."ancestry" ILIKE '2216/2217/%') OR "groups"."ancestry" = '2216/2217')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2217,2218) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.918555"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.918555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2219]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2219]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2219]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2219"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.922774"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.922774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.926117"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:18:41.926117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.928192"], ["group_id", 2220], ["person_id", 2763], ["updated_at", "2014-10-13 14:18:41.928192"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.928835' WHERE "people"."id" = 2763 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2220]] SQL (0.7ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.930237' WHERE "groups"."id" = 2220  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2220]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2220]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2220]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2219/2220"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.938422"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.938422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.941825"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:18:41.941825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.943753"], ["group_id", 2221], ["person_id", 2764], ["updated_at", "2014-10-13 14:18:41.943753"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.944438' WHERE "people"."id" = 2764 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2221]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.945745' WHERE "groups"."id" = 2221  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.947547"], ["group_id", 2221], ["person_id", 2764], ["updated_at", "2014-10-13 14:18:41.947547"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.948214' WHERE "people"."id" = 2764 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2221]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.949864' WHERE "groups"."id" = 2221  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2220 OR "groups"."ancestry" ILIKE '2219/2220/%') OR "groups"."ancestry" = '2219/2220')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2220,2221) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:41.959593"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.959593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2222]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2222]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2222]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2222"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:41.963772"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.963772"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.967829"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:18:41.967829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.969782"], ["group_id", 2223], ["person_id", 2765], ["updated_at", "2014-10-13 14:18:41.969782"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.970387' WHERE "people"."id" = 2765 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2223]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.971737' WHERE "groups"."id" = 2223  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2223]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2223]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2223]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2222/2223"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:18:41.978908"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:41.978908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.983288"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:18:41.983288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.985548"], ["group_id", 2224], ["person_id", 2766], ["updated_at", "2014-10-13 14:18:41.985548"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.986258' WHERE "people"."id" = 2766 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2224]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.987593' WHERE "groups"."id" = 2224  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:41.989478"], ["group_id", 2224], ["person_id", 2766], ["updated_at", "2014-10-13 14:18:41.989478"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:41.990136' WHERE "people"."id" = 2766 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2224]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:41.991614' WHERE "groups"."id" = 2224  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2223 OR "groups"."ancestry" ILIKE '2222/2223/%') OR "groups"."ancestry" = '2222/2223')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2223,2224) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.003853"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.003853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2225"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.008933"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.008933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2225]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.017159"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.017159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.024703"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.024703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2228]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2228]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2228]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2228"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.029070"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.029070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0160' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:42.032702"], ["slug", "surname-0160"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 14:18:42.032702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.034173"], ["group_id", 2229], ["leader", "t"], ["person_id", 2767], ["updated_at", "2014-10-13 14:18:42.034173"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:42.034918' WHERE "people"."id" = 2767 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:42.035582' WHERE "groups"."id" = 2229  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 2229]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.044138"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.044138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2230]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2230]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2230]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2230"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.049061"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.049061"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2230/2231' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.057531"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.057531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2232]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2232]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2232]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2232"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.062445"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.062445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2232/2233' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.072772"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.072772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.079415"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.079415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2235'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.087120"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.087120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2236]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2236]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2236]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2236"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.092945"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.092945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2236]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2236'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.101856"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.101856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2238]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2238]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2238]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2238"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.106271"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.106271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2238/2239/%' OR "groups"."ancestry" = '2238/2239')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2239]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2239]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.117293"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.117293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2240]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2240]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2240]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2240"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.121669"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.121669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2240/2241/%' OR "groups"."ancestry" = '2240/2241'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:42.127063"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:18:42.127063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:42.136660"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:18:42.136660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:42.140990"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:42.140990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.145240"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:18:42.145240"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:42.155406"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:42.155406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:42.167259"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:42.167259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:42.176966"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:42.176966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:42.188642"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:42.188642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:18:42.199258"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:18:42.199258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.1ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.234099"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.234099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.247542"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.247542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.252897"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:18:42.252897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:42.255938"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:18:42.255938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.263989"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.263989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2244]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2244]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2244]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2244"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:42.269660"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:42.269660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:42.271642"], ["group_id", 2245], ["person_id", 2778], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:42.271642"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2778]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:42.273077' WHERE "people"."id" = 2778 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:42.273714' WHERE "groups"."id" = 2245  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2777]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2778]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:43.305298"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:18:43.305298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:43.307813"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:18:43.307813"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:43.314525"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:43.314525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2246]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2246]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2246]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2246"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:43.319139"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:43.319139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:43.321167"], ["group_id", 2247], ["person_id", 2780], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:43.321167"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2780]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:43.322577' WHERE "people"."id" = 2780 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:43.323300' WHERE "groups"."id" = 2247  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2779]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2780]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778, 2780) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778, 2780) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2778, 2780) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:44.345283"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:18:44.345283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:44.347978"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:18:44.347978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:44.355289"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:44.355289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2248]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2248]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2248]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2248"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:44.360900"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:44.360900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:44.363128"], ["group_id", 2249], ["person_id", 2782], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:44.363128"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2782]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:44.364656' WHERE "people"."id" = 2782 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:44.365367' WHERE "groups"."id" = 2249  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2781]] SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2782]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2779, 2781, 2777) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2779, 2781, 2777) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2779, 2781, 2777) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:45.387968"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:18:45.387968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:45.390446"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:18:45.390446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:45.396525"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:45.396525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2250]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2250]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2250]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2250"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:45.400896"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:45.400896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:45.402755"], ["group_id", 2251], ["person_id", 2784], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:45.402755"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2784]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:45.404081' WHERE "people"."id" = 2784 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:45.404757' WHERE "groups"."id" = 2251  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2783]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2784]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2777, 2779, 2781, 2783) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2777, 2779, 2781, 2783) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2777, 2779, 2781, 2783) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:46.425534"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:18:46.425534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:46.428320"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:18:46.428320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:46.435042"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:46.435042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2252]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2252]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2252]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2252"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:18:46.439605"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:46.439605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:46.441623"], ["group_id", 2253], ["person_id", 2786], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:18:46.441623"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2786]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:18:46.443706' WHERE "people"."id" = 2786 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:18:46.444467' WHERE "groups"."id" = 2253  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2785]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2786]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2786, 2784, 2778, 2780, 2782) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2786, 2784, 2778, 2780, 2782) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2786, 2784, 2778, 2780, 2782) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.1ms) DELETE FROM "groups" SQL (0.1ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.532930"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 14:18:47.532930"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.535655"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 14:18:47.535655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"2788"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2787]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2788' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2788]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.545441"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 14:18:47.545441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.547724"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 14:18:47.547724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2790"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2789]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2790' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2790]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2790], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:47.554785"], ["updated_at", "2014-10-13 14:18:47.554785"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "634e159b-c8de-4988-9f02-b79fc899a6e8"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 3.8ms Sent mail to someone.else@digital.justice.gov.uk (2.4ms) Date: Mon, 13 Oct 2014 15:18:47 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdf47886a1_1064f3fd081c65bec6579d@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/634e159b-c8de-4988-9f02-b79fc899a6e8?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 11ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.564147"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 14:18:47.564147"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.568361"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 14:18:47.568361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2792"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2791]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2792' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2792]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2792], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:47.574861"], ["updated_at", "2014-10-13 14:18:47.574861"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "83cde3d0-fea3-4550-921b-c4b1ff1daf96"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 2.7ms Sent mail to someone.else@digital.justice.gov.uk (1.8ms) Date: Mon, 13 Oct 2014 15:18:47 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdf478d0a6_1064f3fd081c65bec658a8@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/83cde3d0-fea3-4550-921b-c4b1ff1daf96?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.582573"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 14:18:47.582573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.585158"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 14:18:47.585158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2794"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2793]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2794' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2794]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.593542"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 14:18:47.593542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.595936"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 14:18:47.595936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2796"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2795]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2796' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2796]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.604709"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 14:18:47.604709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.607193"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 14:18:47.607193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2798"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2797]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2798' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2798]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:47.618425"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:18:47.618425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:18:47.621133"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:18:47.621133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2799]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:48.638972"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:48.638972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2800]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2800]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2800]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2800) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2800]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2800]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2799) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2799]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 1.0ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.1ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.770060"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:18:48.770060"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.772677"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:18:48.772677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2802], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2801]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to recipient@example.com (1.9ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdf48bdbc3_1064f3fd081c65bec6595@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.781667"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:18:48.781667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.784622"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:18:48.784622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2804], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2803]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.2ms Sent mail to recipient@example.com (1.8ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdf48c096c_1064f3fd081c65bec66075@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.794161"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:18:48.794161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.797330"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:18:48.797330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2806], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2805]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.5ms Sent mail to recipient@example.com (2.2ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdf48c3e9a_1064f3fd081c65bec66134@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.807081"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:18:48.807081"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.809473"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:18:48.809473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2808], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2807]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to recipient@example.com (2.6ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdf48c6ac3_1064f3fd081c65bec662cf@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.819587"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:18:48.819587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.822192"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:18:48.822192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2810], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2809]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.1ms Sent mail to recipient@example.com (1.7ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdf48c9adf_1064f3fd081c65bec663e@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:48.830264"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 14:18:48.830264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.832183"], ["updated_at", "2014-10-13 14:18:48.832183"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "60c074a1-e739-43a9-ac69-14f55c2f9ab3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2811]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.7ms Sent mail to test.user@digital.justice.gov.uk (3.4ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf48cc852_1064f3fd081c65bec664d3@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/60c074a1-e739-43a9-ac69-14f55c2f9ab3?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:48.845795"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 14:18:48.845795"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.848559"], ["updated_at", "2014-10-13 14:18:48.848559"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d2957737-0839-4d08-ae11-a154a59cb3a6"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2812]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 5.0ms Sent mail to test.user@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf48d0582_1064f3fd081c65bec665fd@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d2957737-0839-4d08-ae11-a154a59cb3a6?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:48.858958"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 14:18:48.858958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.860793"], ["updated_at", "2014-10-13 14:18:48.860793"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "661c91b2-43c7-41e9-bfd4-fea9f2ffe9c7"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2813]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 3.8ms Sent mail to test.user@digital.justice.gov.uk (2.9ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf48d3603_1064f3fd081c65bec66656@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/661c91b2-43c7-41e9-bfd4-fea9f2ffe9c7?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:48.869655"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 14:18:48.869655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.871536"], ["updated_at", "2014-10-13 14:18:48.871536"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "30dcd276-5d06-45a2-8e90-0ec9bbab570b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2814]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.4ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf48d5e8f_1064f3fd081c65bec667e9@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/30dcd276-5d06-45a2-8e90-0ec9bbab570b?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:48.880354"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 14:18:48.880354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:48.882519"], ["updated_at", "2014-10-13 14:18:48.882519"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "1c2781be-0f3a-4ce7-9e99-5a4466116fd7"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2815]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.6ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:18:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdf48d88c0_1064f3fd081c65bec668d6@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/1c2781be-0f3a-4ce7-9e99-5a4466116fd7?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:48.895778"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:48.895778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2816]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2816]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2816]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2816) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 48.5ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2816]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:48 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2816]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:49.005043"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-9ad849f9-9ed7-44bd-aa75-8247793027fa"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:49.005043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-9ad849f9-9ed7-44bd-aa75-8247793027fa Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-9ad849f9-9ed7-44bd-aa75-8247793027fa" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-9ad849f9-9ed7-44bd-aa75-8247793027fa"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2816]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-9ad849f9-9ed7-44bd-aa75-8247793027fa' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2817) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.032187"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.032187"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2818]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2818) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:49.080435"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 14:18:49.080435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2819) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.2ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2819) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 5.1ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:18:49 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf4922d8d_1064f3fd081c65bec66965@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2819]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 19ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2818]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.174077"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.174077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2820]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2820) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.1ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.224157"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:49.224157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2821) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 0.9ms) Started GET "/people/test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70/edit" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2821) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2821) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2821) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2821 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:18:49.302016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70 Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2820]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e8fb9742-e2eb-4c59-8060-0d8c60844d70' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2821) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.2ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.330810"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.330810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2822]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2822]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2822]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2822) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (13.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (14.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 52ms (Views: 47.5ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:49.391221"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:18:49.391221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:49.392986"], ["updated_at", "2014-10-13 14:18:49.392986"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "f8de4d89-3850-4604-a160-aea77e981144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/f8de4d89-3850-4604-a160-aea77e981144?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"f8de4d89-3850-4604-a160-aea77e981144"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'f8de4d89-3850-4604-a160-aea77e981144' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2823]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2823) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.423458"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.423458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2824]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2824) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:49.473237"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 14:18:49.473237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25/edit" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2825) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.8ms | ActiveRecord: 1.4ms) Started DELETE "/people/test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0ae5a94a-6e6c-41bf-a68e-b5c1a575ab25' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2825) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2825]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2824]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.552860"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.552860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2826]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2826) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.9ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.602912"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:49.602912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2827) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2827) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2827) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2827) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2827 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:49.680742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:49.683281"], ["updated_at", "2014-10-13 14:18:49.683281"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "55cdffc5-f3a9-446a-b0d5-beab0c286242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 6.4ms Sent mail to bob.smithe@digital.justice.gov.uk (2.2ms) Date: Mon, 13 Oct 2014 15:18:49 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bdf49a86cb_1064f3fd081c65bec67025@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/55cdffc5-f3a9-446a-b0d5-beab0c286242?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:49.692217"], ["updated_at", "2014-10-13 14:18:49.692217"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "c7e3109e-b952-4946-9308-aa02092fa2c3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 5.6ms Sent mail to bob.smith@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:18:49 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf49aa63b_1064f3fd081c65bec671f8@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/c7e3109e-b952-4946-9308-aa02092fa2c3?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 28ms (ActiveRecord: 2.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2826]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2827) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.725415"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.725415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2828]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2828]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2828]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2828) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2828]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2828]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:49.824116"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-f5d07d5f-2097-4193-8b95-58082fa8dfba"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:49.824116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-f5d07d5f-2097-4193-8b95-58082fa8dfba Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-f5d07d5f-2097-4193-8b95-58082fa8dfba" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f5d07d5f-2097-4193-8b95-58082fa8dfba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2828]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f5d07d5f-2097-4193-8b95-58082fa8dfba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2829) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (15.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 30ms (Views: 25.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.869737"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:49.869737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2830]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2830) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.1ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:49.920019"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:49.920019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2831) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2831) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2831) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2831) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2831 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:18:49.999569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 14ms (ActiveRecord: 2.1ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2830]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2831) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.029017"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.029017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2832]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2832) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.3ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.076113"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:50.076113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2833) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 1.5ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2833) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.5ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2833) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2833) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2833 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:18:50.158334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:50.160901"], ["updated_at", "2014-10-13 14:18:50.160901"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "c40ccbd4-a767-4778-a25c-05da4c9446ac"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 6.0ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:18:50 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf4a28c80_1064f3fd081c65bec6724f@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/c40ccbd4-a767-4778-a25c-05da4c9446ac?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 20ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2832]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2833) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.196512"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.196512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2834]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2834) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0180' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:50.244022"], ["slug", "surname-0180"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 14:18:50.244022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0180/edit" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0180"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2835) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 0.9ms) Started DELETE "/people/surname-0180" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0180"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0180' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2835) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2835]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2834]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 29.8ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.343256"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.343256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2836]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2836) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.392740"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-03ade46f-fae1-438b-bb28-551cb042274a"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:50.392740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-03ade46f-fae1-438b-bb28-551cb042274a" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-03ade46f-fae1-438b-bb28-551cb042274a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-03ade46f-fae1-438b-bb28-551cb042274a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2837) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.9ms | ActiveRecord: 1.2ms) Started GET "/people/test-user-03ade46f-fae1-438b-bb28-551cb042274a/edit" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-03ade46f-fae1-438b-bb28-551cb042274a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-03ade46f-fae1-438b-bb28-551cb042274a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2837) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.4ms | ActiveRecord: 1.3ms) Started PATCH "/people/test-user-03ade46f-fae1-438b-bb28-551cb042274a" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-03ade46f-fae1-438b-bb28-551cb042274a"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-03ade46f-fae1-438b-bb28-551cb042274a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2837) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2837) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2837 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:50.475824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:50.478445"], ["updated_at", "2014-10-13 14:18:50.478445"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "b845544b-571a-4e08-a733-a8c321ce0af9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 3.1ms Sent mail to bob.smith@digital.justice.gov.uk (2.2ms) Date: Mon, 13 Oct 2014 15:18:50 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf4a75982_1064f3fd081c65bec673a9@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/b845544b-571a-4e08-a733-a8c321ce0af9?desired_path=%2Fpeople%2Ftest-user-03ade46f-fae1-438b-bb28-551cb042274a. Redirected to http://www.example.com/people/test-user-03ade46f-fae1-438b-bb28-551cb042274a Completed 302 Found in 18ms (ActiveRecord: 2.2ms) Started GET "/people/test-user-03ade46f-fae1-438b-bb28-551cb042274a" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-03ade46f-fae1-438b-bb28-551cb042274a"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2836]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-03ade46f-fae1-438b-bb28-551cb042274a' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2837) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.509271"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.509271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2838]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2838]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2838]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2838) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2838]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 29.8ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2838]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:50.608305"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-a34b682b-0ba0-461e-9d39-c66ea1cca226"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:50.608305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-a34b682b-0ba0-461e-9d39-c66ea1cca226 Completed 302 Found in 9ms (ActiveRecord: 1.3ms) Started GET "/people/test-user-a34b682b-0ba0-461e-9d39-c66ea1cca226" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-a34b682b-0ba0-461e-9d39-c66ea1cca226"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2838]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a34b682b-0ba0-461e-9d39-c66ea1cca226' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2839) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.634755"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.634755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2840]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2840]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2840]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2840) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2840]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.4ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2840]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:50.736855"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:50.736855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.1ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2840]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2841) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 14ms (Views: 10.0ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.763394"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.763394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2842]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2842) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 53ms (Views: 48.0ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:50.826254"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-e1f12d38-358b-451c-b355-a2099a073f44"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 14:18:50.826254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e1f12d38-358b-451c-b355-a2099a073f44/edit" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-e1f12d38-358b-451c-b355-a2099a073f44"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e1f12d38-358b-451c-b355-a2099a073f44' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2843) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-e1f12d38-358b-451c-b355-a2099a073f44" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-e1f12d38-358b-451c-b355-a2099a073f44"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e1f12d38-358b-451c-b355-a2099a073f44' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2843) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2843]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2842]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.9ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.910001"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:50.910001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2844]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2844) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 40.2ms | ActiveRecord: 1.6ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:50.967466"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:50.967466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2845) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba/edit" for 127.0.0.1 at 2014-10-13 15:18:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2845) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2845) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2845) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 2845 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:18:51.052299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba Completed 302 Found in 13ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2844]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-3c35f9bd-c1ce-41e9-b209-15b6334dadba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2845) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.4ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.080934"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:51.080934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2846]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2846) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:51.131310"], ["email", "test.user"], ["slug", "test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 14:18:51.131310"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4/edit" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2847) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-6ace4cbf-8018-4e51-b377-8689c8554bf4' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2847) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2847]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2846]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.215013"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:51.215013"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2848]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2848) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.278432"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:51.278432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2849) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.4ms | ActiveRecord: 1.8ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2849) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 37.2ms | ActiveRecord: 1.5ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2849) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2849) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2849 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:51.371156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:51.373877"], ["updated_at", "2014-10-13 14:18:51.373877"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "9a8ea846-d031-447e-9881-9da57735f700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 2.9ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:18:51 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf4b5c081_1064f3fd081c65bec674d3@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/9a8ea846-d031-447e-9881-9da57735f700?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 19ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2848]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2849) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.406416"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:51.406416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2850]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2850]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2850]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2850) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.1ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2850]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 32.6ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2850]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:18:51.513101"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:51.513101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:18:51.515218"], ["updated_at", "2014-10-13 14:18:51.515218"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "ba43d016-6e3a-4f1b-af54-42d2c6ec535d"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 6.2ms Sent mail to bob.smith@digital.justice.gov.uk (2.2ms) Date: Mon, 13 Oct 2014 15:18:51 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdf4b7f628_1064f3fd081c65bec67510@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/ba43d016-6e3a-4f1b-af54-42d2c6ec535d?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 17ms (ActiveRecord: 1.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2850]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2851) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.549955"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:51.549955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2852]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2852) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:51.598015"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:51.598015"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2853) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2853) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 36.8ms | ActiveRecord: 1.3ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2853) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2853) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 2853 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:18:51.680557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2852]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2853) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.710240"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:18:51.710240"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2854]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2854) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (41.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 57ms (Views: 50.7ms | ActiveRecord: 1.3ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:18:51.777519"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:18:51.777519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2855) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.5ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2855) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 43ms (Views: 35.9ms | ActiveRecord: 1.4ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2855) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 2855) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 2855 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:18:51.862023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:18:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2854]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2855) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.9ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:51.888568"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 14:18:51.888568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2856]] Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:51.896963"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 14:18:51.896963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2857]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:18:51.903613"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 14:18:51.903613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2858]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (1.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.7ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.409861"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 14:20:33.409861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.419073"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 14:20:33.419073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2860"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2859]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2860' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2860]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/information_requests/new.html.haml within layouts/peoplefinder/application (0.2ms) Completed 200 OK in 17ms (Views: 6.1ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.444659"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 14:20:33.444659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.447098"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 14:20:33.447098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2862"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2861]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2862' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2862]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.455131"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 14:20:33.455131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.457758"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 14:20:33.457758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"2864"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2863]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2864' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2864]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.465600"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 14:20:33.465600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.467972"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 14:20:33.467972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2866"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2865]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2866' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2866]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2866], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:33.478664"], ["updated_at", "2014-10-13 14:20:33.478664"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "2cb0c972-3032-470a-b7cc-c3d7fdb46a4f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 13.9ms Sent mail to someone.else@digital.justice.gov.uk (5.0ms) Date: Mon, 13 Oct 2014 15:20:33 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdfb177cd0_106ee3fdc61465be0209dd@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/2cb0c972-3032-470a-b7cc-c3d7fdb46a4f?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 24ms (ActiveRecord: 3.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.497921"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 14:20:33.497921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.500304"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 14:20:33.500304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"2868"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2867]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2868' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2868]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 2868], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:33.506224"], ["updated_at", "2014-10-13 14:20:33.506224"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "f95c5f84-51d4-48b3-84f7-44a04307a1db"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 2.7ms Sent mail to someone.else@digital.justice.gov.uk (1.7ms) Date: Mon, 13 Oct 2014 15:20:33 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdfb17c46e_106ee3fdc61465be02104f@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/f95c5f84-51d4-48b3-84f7-44a04307a1db?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 8ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.514057"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 14:20:33.514057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.516371"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 14:20:33.516371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"2870"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2869]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2870' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2870]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:33.546182"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:33.546182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2871]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 21ms (ActiveRecord: 4.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2871) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (59.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (75.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.1ms) Completed 200 OK in 200ms (Views: 184.4ms | ActiveRecord: 2.8ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.775845"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:33.775845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2255]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2255]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2255"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:33.781844"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:33.781844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2256) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2255, 2256) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2256]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (6.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2255/2256' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2255/2256' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2256]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 21.8ms | ActiveRecord: 2.6ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 14.3ms | ActiveRecord: 0.6ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2256", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2256]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2256]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2256]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2256]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2255/2256"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:33.849180"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:20:33.849180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2871]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2257) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2255, 2256, 2257) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2257]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2255/2256/2257' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2255/2256/2257' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2257]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2256]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:33.879356"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:33.879356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2872]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2872]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2872]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2872) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.7ms | ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:33.925732"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:33.925732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2258"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:33.930248"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:33.930248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0001/edit" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0001"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2872]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0001' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2259) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2258, 2259) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2258) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2258/2259' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 17.3ms | ActiveRecord: 2.2ms) Started DELETE "/teams/group-0001" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0001"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2872]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0001' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2259) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2258]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2258/2259/%' OR "groups"."ancestry" = '2258/2259')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2258/2259' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2259]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.2ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:20:33 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2872]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2258) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2258) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2258]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2258' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2258' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2258]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.6ms | ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2259]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:35.055737"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:35.055737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2260]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2260]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2260]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2260"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:35.061173"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:35.061173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 13ms (Views: 12.5ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 15:20:35 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:36.676359"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:36.676359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2873]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2873) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 15ms (Views: 12.9ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2261", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2261]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2261]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2261]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2261]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2260/2261"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:36.934324"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:20:36.934324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:36 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2873]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2262) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2260, 2261, 2262) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2262]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2260/2261/2262' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2260/2261/2262' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2262]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 2.3ms) Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 15:20:37 +0100  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.033993"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.033993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2874]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2874]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2874]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2874) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:37.081983"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.081983"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2263"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:37.086772"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.086772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0002/edit" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0002"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2874]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0002' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2264) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2263, 2264) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (17.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2263]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2263) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2263/2264' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.1ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.140105"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.140105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2875]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2875) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.1ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.5ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:37.209829"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:20:37.209829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2265) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2265) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2265]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2265' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2265' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2265]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 2.2ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2875]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2265) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2265) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2265' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2265' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.265727"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.265727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2876]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2876]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2876]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2876) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:37.316723"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.316723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2266]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2266]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2266]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2266"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:37.321559"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.321559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2266]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2876]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2266) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2266) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2266' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2266' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.353376"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.353376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2877]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2877]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2877]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2877) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:37.399420"], ["slug", "surname-0013"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 14:20:37.399420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:37.406085"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.406085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2268"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:37.411255"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.411255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:37.412975"], ["group_id", 2269], ["person_id", 2878], ["updated_at", "2014-10-13 14:20:37.412975"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:37.414440' WHERE "people"."id" = 2878 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:37.415506' WHERE "groups"."id" = 2269  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0004/edit" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0004"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2877]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0004' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2269) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2268, 2269) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2268]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2268) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (23.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2268/2269' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 29.9ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.464693"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.464693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2879]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2879]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2879]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2879) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2879]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:37.530785"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:37.530785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2880]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2880]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2880]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2880) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2880]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2880]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:37.599839"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:20:37.599839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2880]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2270) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2270) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (3.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2270' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2270' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2270]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:37.636468"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.636468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2271"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:37.641709"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.641709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2271/2272"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:37.646686"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:37.646686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:37 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:38.068343"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:38.068343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2881]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2881) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2273) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2271, 2272, 2273) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2271/2272/2273' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2271/2272/2273' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2273) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2271, 2272, 2273) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2272]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2271, 2272) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (21.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2271/2272/2273' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 30.6ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2271", "team_email_address"=>"example.user.15@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2273) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2273) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2273) LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2271/2272/2273/%' OR "groups"."ancestry" = '2271/2272/2273')) SQL (0.2ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 2273 [["ancestry", "2271"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:20:38.429747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2881]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2273) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2271, 2273) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2271/2273' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2271/2273' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2273]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2273]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2271]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:38.535667"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:38.535667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:38.987340"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:38.987340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2882]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2882) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 42ms (Views: 37.0ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2274) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2274) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2274]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2274' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2274' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2274]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.5ms | ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 18ms (Views: 14.4ms | ActiveRecord: 0.7ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"2274", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2274]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2274]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2274]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2274]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2274"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:39.281017"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:20:39.281017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/teams/csg Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2882]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2275) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2274, 2275) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2275]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2274/2275' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2274/2275' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2275]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2274]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:39.373178"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:39.373178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2276]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2276]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2276]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2276"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:39.378908"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:39.378908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2276/2277"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:39.386797"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:39.386797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:39.838295"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:39.838295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2883]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2883) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.8ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2278) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2276, 2277, 2278) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2276/2277/2278' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2276/2277/2278' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 2.1ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2278) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2276, 2277, 2278) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (11.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (11.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (12.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2276, 2277) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (12.8ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2276/2277/2278' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 38ms (Views: 31.2ms | ActiveRecord: 2.5ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2277", "team_email_address"=>"example.user.19@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2278) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2278) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2278) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2278 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:20:40.190545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/teams/cyberdigital-cyberservices Completed 302 Found in 12ms (ActiveRecord: 2.7ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2883]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2278) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2276, 2277, 2278) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2276/2277/2278' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2276/2277/2278' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2278]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2278]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2277]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:40.283538"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:40.283538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2884]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2884]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2884]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2884) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2884]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2884) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2884]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2884) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2884]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2884]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.450539"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.450539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2279]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2279]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2279]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2279"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.455412"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.455412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.494754"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.494754"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2281]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2281]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2281]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2281"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.500089"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.500089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:40.516002"], ["updated_at", "2014-10-13 14:20:40.516002"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "3016ad54-ab73-48aa-a34e-4264a13382bc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 4.8ms Sent mail to james.darling@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:20:40 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bdfb880727_106ee3fdc61465be0211fb@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/3016ad54-ab73-48aa-a34e-4264a13382bc If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 4.9ms | ActiveRecord: 0.4ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.543268"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.543268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2283]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2283]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2283]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2283"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.548387"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.548387"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:40.564847"], ["updated_at", "2014-10-13 14:20:40.564847"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "4e1e71b1-132c-4b84-bbe8-88d1a768a042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/4e1e71b1-132c-4b84-bbe8-88d1a768a042" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"4e1e71b1-132c-4b84-bbe8-88d1a768a042"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '4e1e71b1-132c-4b84-bbe8-88d1a768a042' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:40.571395"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 14:20:40.571395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2885]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2885]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2885]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2885) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.643610"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.643610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2285]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2285]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2285]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2285"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.650084"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.650084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.682582"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.682582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2287]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2287]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2287]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2287"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.687841"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.687841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.691393"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:20:40.691393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:40.694261"], ["updated_at", "2014-10-13 14:20:40.694261"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "93a21015-b808-4adc-b9e6-d2adfefa5378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/93a21015-b808-4adc-b9e6-d2adfefa5378" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"93a21015-b808-4adc-b9e6-d2adfefa5378"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '93a21015-b808-4adc-b9e6-d2adfefa5378' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2886]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2886]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2886]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2886) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.754661"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.754661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2289]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2289]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2289]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2289"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.759423"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.759423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:40.761130"], ["updated_at", "2014-10-13 14:20:40.761130"], ["user_email", "example.user.32@digital.justice.gov.uk"], ["value", "5fe7a3e6-1f7d-4168-ae7d-55a11efaf722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/5fe7a3e6-1f7d-4168-ae7d-55a11efaf722" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"5fe7a3e6-1f7d-4168-ae7d-55a11efaf722"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '5fe7a3e6-1f7d-4168-ae7d-55a11efaf722' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.32@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-32' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:40.766974"], ["email", "example.user.32@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-32"], ["surname", "user"], ["updated_at", "2014-10-13 14:20:40.766974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2887]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2887]] Redirected to http://www.example.com/people/example-user-32/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/example-user-32/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-32"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2887]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-32' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2887) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.823789"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.823789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2291]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2291]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2291]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2291"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:40.828818"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:40.828818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.831714"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 14:20:40.831714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:40.833642"], ["updated_at", "2014-10-13 14:20:40.833642"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "91edb79f-4e9f-4eae-bd84-c7a2541cfad3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2888]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 8.0ms Sent mail to test.user@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:20:40 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb8cd83e_106ee3fdc61465be0212dc@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/91edb79f-4e9f-4eae-bd84-c7a2541cfad3?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/91edb79f-4e9f-4eae-bd84-c7a2541cfad3?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"91edb79f-4e9f-4eae-bd84-c7a2541cfad3"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '91edb79f-4e9f-4eae-bd84-c7a2541cfad3' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 2ms (ActiveRecord: 0.7ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2888]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2888) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.907814"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 14:20:40.907814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.910494"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:40.910494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2889]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.919524"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 14:20:40.919524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.922010"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 14:20:40.922010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"2892"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2891]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2892' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2892]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.929802"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 14:20:40.929802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.940916"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:40.940916"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2894"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2893]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2894' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2894]] Redirected to http://test.host/people/doe?cache_bust=1413210040 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.951999"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 14:20:40.951999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:40.956833"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:40.956833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"2896"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2895]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2896' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2896]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:40.986569"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:40.986569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2897]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2897]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2897]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2897) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.059184"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.059184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2293]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2293]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2293]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2293"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.064102"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.064102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0012" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0012"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:41.082560"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:41.082560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0012 Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Started GET "/teams/group-0012" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0012"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2898]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0012' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2294) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2293, 2294) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2294]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2293/2294' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2293/2294' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2294]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:41 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.142234"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.142234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2295) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.150193"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.150193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2296]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2296]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2296]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2296"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.155449"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.155449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.167766"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.167766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2298]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2298]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2298"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.173205"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.173205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2299]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2299]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2299]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2298/2299"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.178265"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.178265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2300]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2300]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2300]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2298/2299/2300"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:41.183620"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.183620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2298, 2299, 2300, 2301) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.191736"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.191736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2302]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2302]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2302]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2302"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.196201"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.196201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2303]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2303]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2303]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2302/2303"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.201255"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.201255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2304]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2304]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2304]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2302/2303/2304"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:41.206500"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.206500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0019' AND "groups"."id" != 2303) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.215271"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.215271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2306]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2306]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2306]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0022-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2306"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.220276"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.220276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2306/2307' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.228945"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.228945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2308]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2308]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2308"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.233728"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.233728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2308/2309' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.241866"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.241866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2310]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2310]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2310]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2310"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.246431"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.246431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2310/2311/%' OR "groups"."ancestry" = '2310/2311'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.257261"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.257261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2312]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2312]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2312]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2312"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.262202"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.262202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2312/2313/%' OR "groups"."ancestry" = '2312/2313')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2313]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2313]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.286813"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.286813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.294625"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.294625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2315"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.299793"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.299793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2315]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.308833"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.308833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2317]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2317]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2317]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2317"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.313443"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.313443"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.317459"], ["slug", "surname-0019"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 14:20:41.317459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.319287"], ["group_id", 2318], ["person_id", 2899], ["updated_at", "2014-10-13 14:20:41.319287"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.319991' WHERE "people"."id" = 2899 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2318]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.321506' WHERE "groups"."id" = 2318  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2317/2318' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2318]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.333071"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.333071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2319]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2319]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2319]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2319"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.337642"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.337642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2320]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2320]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2320]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2319/2320"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.342665"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.342665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2320]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2319/2320' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.351126"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.351126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2322]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2322]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2322]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2322"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.355874"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.355874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.358898"], ["slug", "surname-0020"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 14:20:41.358898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.360538"], ["group_id", 2323], ["person_id", 2900], ["updated_at", "2014-10-13 14:20:41.360538"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.361350' WHERE "people"."id" = 2900 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2323]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.362935' WHERE "groups"."id" = 2323  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2322/2323' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2323]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.374204"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.374204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2324]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2324]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2324]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2324"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.381336"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.381336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2324/2325' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2325]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.393996"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.393996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2326]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2326]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2326]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2326"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.399943"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.399943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0021' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.404329"], ["slug", "surname-0021"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 14:20:41.404329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.406740"], ["group_id", 2327], ["leader", "t"], ["person_id", 2901], ["updated_at", "2014-10-13 14:20:41.406740"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.407810' WHERE "people"."id" = 2901 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.408673' WHERE "groups"."id" = 2327  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 2327]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.417973"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.417973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2328]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2328]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2328]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2328"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.422527"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.422527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.425796"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:20:41.425796"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.427952"], ["group_id", 2329], ["person_id", 2902], ["updated_at", "2014-10-13 14:20:41.427952"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.428647' WHERE "people"."id" = 2902 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2329]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.430169' WHERE "groups"."id" = 2329  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2329 OR "groups"."ancestry" ILIKE '2328/2329/%') OR "groups"."ancestry" = '2328/2329')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.4ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2329) group by p.id;  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.442070"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.442070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2330]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2330]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2330]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2330"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.446866"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.446866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.450280"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:20:41.450280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.452309"], ["group_id", 2331], ["person_id", 2903], ["updated_at", "2014-10-13 14:20:41.452309"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.452987' WHERE "people"."id" = 2903 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2331]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.454417' WHERE "groups"."id" = 2331  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2331]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2331]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2331]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2330/2331"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.459633"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.459633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.463277"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:20:41.463277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.465737"], ["group_id", 2332], ["person_id", 2904], ["updated_at", "2014-10-13 14:20:41.465737"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.466516' WHERE "people"."id" = 2904 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2332]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.467901' WHERE "groups"."id" = 2332  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2331 OR "groups"."ancestry" ILIKE '2330/2331/%') OR "groups"."ancestry" = '2330/2331')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2331,2332) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.477400"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.477400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2333]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2333]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2333]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2333"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.482444"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.482444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.485709"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:20:41.485709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.487751"], ["group_id", 2334], ["person_id", 2905], ["updated_at", "2014-10-13 14:20:41.487751"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.488647' WHERE "people"."id" = 2905 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2334]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.490136' WHERE "groups"."id" = 2334  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2334]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2334]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2333/2334"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.495961"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.495961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.499509"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:20:41.499509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.501499"], ["group_id", 2335], ["person_id", 2906], ["updated_at", "2014-10-13 14:20:41.501499"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.502113' WHERE "people"."id" = 2906 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2335]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.503720' WHERE "groups"."id" = 2335  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.505381"], ["group_id", 2335], ["person_id", 2906], ["updated_at", "2014-10-13 14:20:41.505381"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.506057' WHERE "people"."id" = 2906 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2335]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.507432' WHERE "groups"."id" = 2335  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2334 OR "groups"."ancestry" ILIKE '2333/2334/%') OR "groups"."ancestry" = '2333/2334')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2334,2335) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.516821"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.516821"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2336]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2336]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2336]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2336"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.521216"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.521216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.524709"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:20:41.524709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.526974"], ["group_id", 2337], ["person_id", 2907], ["updated_at", "2014-10-13 14:20:41.526974"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.527649' WHERE "people"."id" = 2907 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2337]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.528987' WHERE "groups"."id" = 2337  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2337]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2337]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2337]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2336/2337"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:41.534768"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.534768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.538154"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:20:41.538154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.540114"], ["group_id", 2338], ["person_id", 2908], ["updated_at", "2014-10-13 14:20:41.540114"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.540774' WHERE "people"."id" = 2908 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2338]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.542139' WHERE "groups"."id" = 2338  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.543805"], ["group_id", 2338], ["person_id", 2908], ["updated_at", "2014-10-13 14:20:41.543805"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.544431' WHERE "people"."id" = 2908 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2338]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.545816' WHERE "groups"."id" = 2338  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2337 OR "groups"."ancestry" ILIKE '2336/2337/%') OR "groups"."ancestry" = '2336/2337')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2337,2338) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.555253"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.555253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.562275"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.562275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2340]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2340]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2340]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2340"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.568558"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.568558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2340]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2340'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.577643"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.577643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2342'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.586052"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.586052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2343]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2343]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2343]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2343"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.592714"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.592714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.602879"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.602879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2345"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.608313"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.608313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2345]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2346) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 2346) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 2346 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 14:20:41.612849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2346]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.620779"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.620779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2347"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.627544"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.627544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2347) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2347 [["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.631605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2347]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2347"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.637264"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.637264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.644971"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.644971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2350"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.649663"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.649663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2350) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2350 [["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.653036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2350"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.658535"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.658535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2350) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2350 [["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.661619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2350]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2350"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.668364"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.668364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.674134"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 14:20:41.674134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.676301"], ["updated_at", "2014-10-13 14:20:41.676301"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3934b61c-9684-4319-ab45-033776ba1a94"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2909]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.5ms Sent mail to test.user@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb9a6387_106ee3fdc61465be0213dd@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/3934b61c-9684-4319-ab45-033776ba1a94?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.686581"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 14:20:41.686581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.688535"], ["updated_at", "2014-10-13 14:20:41.688535"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "a3529d7e-435c-48e1-970e-3947aa9ba5a4"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2910]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.1ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb9a9229_106ee3fdc61465be0214f1@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/a3529d7e-435c-48e1-970e-3947aa9ba5a4?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.697163"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 14:20:41.697163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.699163"], ["updated_at", "2014-10-13 14:20:41.699163"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "5dfd45dd-7bfa-457c-871b-a41d454cac16"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2911]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.1ms Sent mail to test.user@digital.justice.gov.uk (1.8ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb9abb8f_106ee3fdc61465be02152d@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/5dfd45dd-7bfa-457c-871b-a41d454cac16?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.707904"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 14:20:41.707904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.709796"], ["updated_at", "2014-10-13 14:20:41.709796"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "8770ece9-e0fe-4f8d-b361-6c14e418bc39"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2912]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.0ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb9ae4f4_106ee3fdc61465be02166e@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/8770ece9-e0fe-4f8d-b361-6c14e418bc39?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.718459"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 14:20:41.718459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.720619"], ["updated_at", "2014-10-13 14:20:41.720619"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "cc6690b6-332d-4714-b5f3-3770e481e252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2913]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.3ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdfb9b1029_106ee3fdc61465be021716@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/cc6690b6-332d-4714-b5f3-3770e481e252?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.729524"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:20:41.729524"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.732592"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:20:41.732592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2915], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2914]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 5.3ms Sent mail to recipient@example.com (2.1ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdfb9b5294_106ee3fdc61465be0218c0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.747065"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:20:41.747065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.763403"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:20:41.763403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2917], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2916]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to recipient@example.com (1.9ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdfb9bba45_106ee3fdc61465be021911@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.774514"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:20:41.774514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.777531"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:20:41.777531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2919], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2918]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to recipient@example.com (2.0ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdfb9bf001_106ee3fdc61465be02201d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.787071"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:20:41.787071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.789770"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:20:41.789770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2921], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2920]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.2ms Sent mail to recipient@example.com (1.9ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdfb9c1d9d_106ee3fdc61465be022131@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.798527"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:20:41.798527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:41.801133"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:20:41.801133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 2923], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 2922]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.2ms Sent mail to recipient@example.com (2.0ms) Date: Mon, 13 Oct 2014 15:20:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdfb9c4a9a_106ee3fdc61465be0222b0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.810215"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:20:41.810215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:41.812909"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:20:41.812909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.819587"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.819587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2354]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2354]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2354]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2354"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:41.824136"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:41.824136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:41.826214"], ["group_id", 2355], ["person_id", 2925], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:41.826214"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2925]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:41.828814' WHERE "people"."id" = 2925 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:41.830136' WHERE "groups"."id" = 2355  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2924]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2925]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:42.860813"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:20:42.860813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:42.863487"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:20:42.863487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:42.870121"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:42.870121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2356]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2356]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2356]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2356"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:42.874934"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:42.874934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:42.876975"], ["group_id", 2357], ["person_id", 2927], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:42.876975"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2927]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:42.878455' WHERE "people"."id" = 2927 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:42.879182' WHERE "groups"."id" = 2357  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2926]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2927]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:43.902211"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:20:43.902211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:43.905103"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:20:43.905103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:43.911466"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:43.911466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2358]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2358]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2358]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2358"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:43.917761"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:43.917761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:43.920375"], ["group_id", 2359], ["person_id", 2929], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:43.920375"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2929]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:43.922120' WHERE "people"."id" = 2929 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:43.922895' WHERE "groups"."id" = 2359  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2928]] SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2929]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:44.945045"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:20:44.945045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:44.948440"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:20:44.948440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:44.955259"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:44.955259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2360]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2360]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2360"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:44.960334"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:44.960334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:44.962310"], ["group_id", 2361], ["person_id", 2931], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:44.962310"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2931]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:44.963845' WHERE "people"."id" = 2931 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:44.964483' WHERE "groups"."id" = 2361  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2930]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2931]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2930, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2930, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2924, 2928, 2930, 2926) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:45.986907"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:20:45.986907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:45.989840"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:20:45.989840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:45.996253"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:45.996253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2362]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2362]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2362]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2362"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:46.001026"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:46.001026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:46.003162"], ["group_id", 2363], ["person_id", 2933], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:46.003162"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2933]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:46.005077' WHERE "people"."id" = 2933 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:46.005842' WHERE "groups"."id" = 2363  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2932]] SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2933]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2933, 2929, 2931, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2933, 2929, 2931, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (2925, 2933, 2929, 2931, 2927) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.4ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:47.094393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 14:20:47.094393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:47.100531"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.100531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2934]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:47.112574"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.112574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:47.121796"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:47.121796"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2935]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2935]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2935]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2935) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2935]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.5ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:47.190190"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:47.190190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2936]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2936]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2936) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:47.239466"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.239466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2366]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2366]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2366]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2366"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:47.258615"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.258615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:47.261685"], ["slug", "surname-0028"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 14:20:47.261685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:47.263546"], ["group_id", 2367], ["person_id", 2937], ["updated_at", "2014-10-13 14:20:47.263546"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2937]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:47.264980' WHERE "people"."id" = 2937 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:47.265643' WHERE "groups"."id" = 2367  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0028/edit" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0028"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0028' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2937) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2366, 2367) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2366, 2367) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2937]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.1ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/473?referer=%2Fpeople%2Fsurname-0028%2Fedit" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0028/edit", "id"=>"473"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2936]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 473]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 473]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2937]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:47.320272' WHERE "people"."id" = 2937 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2367]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:47.321735' WHERE "groups"."id" = 2367  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0028/edit Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Started GET "/people/surname-0028/edit" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0028"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2936]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0028' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2937) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 36.5ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2937]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 2937]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:47.387347"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.387347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2368"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:47.395247"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.395247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:47.398439"], ["slug", "surname-0029"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 14:20:47.398439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:47.401282"], ["group_id", 2369], ["person_id", 2938], ["updated_at", "2014-10-13 14:20:47.401282"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2938]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:47.403434' WHERE "people"."id" = 2938 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:47.404433' WHERE "groups"."id" = 2369  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 2368) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2368 [["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.407778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2368]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2368"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:47.413941"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:47.413941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:47.849928"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:47.849928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2939]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2939) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0029/edit" for 127.0.0.1 at 2014-10-13 15:20:47 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0029"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2938) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2938]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 36.9ms | ActiveRecord: 2.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:48 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership?id=surname-0029" for 127.0.0.1 at 2014-10-13 15:20:48 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2938) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.0ms) Completed 200 OK in 25ms (Views: 18.5ms | ActiveRecord: 1.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:48 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0029" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0029", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2369", "leader"=>"0", "id"=>"474"}, "70215807996360"=>{"role"=>"Talker", "group_id"=>"2370", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2938) ORDER BY groups.name Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2938]] Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2938 AND "memberships"."id" != 474 AND "memberships"."group_id" = 2369) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2369 AND "memberships"."id" != 474 AND "memberships"."person_id" = 2938) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0029' AND "people"."given_name" = '' AND ("people"."id" != 2938) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2938 AND "memberships"."id" != 474 AND "memberships"."group_id" = 2369) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2369 AND "memberships"."id" != 474 AND "memberships"."person_id" = 2938) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2938 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:20:49.175357"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 474 [["role", ""], ["updated_at", "2014-10-13 14:20:49.176550"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:49.177313' WHERE "people"."id" = 2938 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:49.177881' WHERE "groups"."id" = 2369 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:49.178526"], ["group_id", 2370], ["person_id", 2938], ["role", "Talker"], ["updated_at", "2014-10-13 14:20:49.178526"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2938]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:49.179968' WHERE "people"."id" = 2938 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2370]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:49.181291' WHERE "groups"."id" = 2370  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/surname-0029 Completed 302 Found in 20ms (ActiveRecord: 4.0ms) Started GET "/people/surname-0029" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2939]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2938) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2370) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2370) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2368, 2369) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.8ms | ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 2938]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:49.283107"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:49.283107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2371]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2371]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2371]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2371"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:49.289197"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:49.289197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0030' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:49.291876"], ["slug", "surname-0030"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 14:20:49.291876"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:49.293724"], ["group_id", 2372], ["person_id", 2940], ["updated_at", "2014-10-13 14:20:49.293724"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2940]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:49.295158' WHERE "people"."id" = 2940 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:49.295812' WHERE "groups"."id" = 2372  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:49.721918"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:49.721918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2941]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2941) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0030/edit" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0030"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0030' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2940) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2371, 2372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2371, 2372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2940]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.4ms | ActiveRecord: 1.9ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0030" for 127.0.0.1 at 2014-10-13 15:20:49 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0030", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2372", "leader"=>"0", "id"=>"476"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0030"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0030' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2940) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2940]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2940 AND "memberships"."id" != 476 AND "memberships"."group_id" = 2372) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2372 AND "memberships"."id" != 476 AND "memberships"."person_id" = 2940) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0030' AND "people"."given_name" = '' AND ("people"."id" != 2940) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 2940 AND "memberships"."id" != 476 AND "memberships"."group_id" = 2372) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2372 AND "memberships"."id" != 476 AND "memberships"."person_id" = 2940) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 2940 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:20:50.006833"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 476 [["role", "Head Honcho"], ["updated_at", "2014-10-13 14:20:50.007881"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:50.008571' WHERE "people"."id" = 2940 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:50.009221' WHERE "groups"."id" = 2372  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/surname-0030 Completed 302 Found in 17ms (ActiveRecord: 3.2ms) Started GET "/people/surname-0030" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0030"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2941]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0030' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2940) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2371, 2372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2371, 2372) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2940]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:50.102842"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:50.102842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2373]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2373]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2373]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2373"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:50.107943"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:50.107943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:50.535977"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:50.535977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2942]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2942) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 44.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 36.3ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2374", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:20:50.837984"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 14:20:50.837984"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:50.839830"], ["group_id", 2374], ["leader", "t"], ["person_id", 2943], ["role", "Head Honcho"], ["updated_at", "2014-10-13 14:20:50.839830"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2943]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:50.842406' WHERE "people"."id" = 2943 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2374]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:50.844281' WHERE "groups"."id" = 2374  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/taylor Completed 302 Found in 17ms (ActiveRecord: 3.0ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2942]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2943) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2373, 2374) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2373, 2374) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 2943]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:50.945651"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:50.945651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2375]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2375]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2375]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2375"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:50.954182"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:50.954182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:50 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:51.391041"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:51.391041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2944]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2944) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.2ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.4ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:51 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2944]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.747332"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 14:20:51.747332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.750244"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 14:20:51.750244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2946"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2945]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2946' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2946]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.760926"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 14:20:51.760926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.763220"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 14:20:51.763220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2948"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2947]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2948' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2948]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.772063"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 14:20:51.772063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.774555"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 14:20:51.774555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"2950"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2949]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2950' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2950]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.783964"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 14:20:51.783964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.786719"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 14:20:51.786719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.794328"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.794328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2377]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2377]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2377]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2377"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:51.799267"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.799267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:51.802226"], ["group_id", 2378], ["person_id", 2952], ["updated_at", "2014-10-13 14:20:51.802226"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2952]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:51.804177' WHERE "people"."id" = 2952 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:51.804932' WHERE "groups"."id" = 2378  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2952"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2951]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2952' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2952]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2952]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2951], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.123@digital.justice.gov.uk"], ["subject_id", 2952]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.5ms Sent mail to example.user.123@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:20:51 +0100 From: support@example.com To: example.user.123@digital.justice.gov.uk Message-ID: <543bdfc3ca560_106ee3fdc61465be022331@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0037 has said that they believe the information on Surname-0038 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 23ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.835696"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 14:20:51.835696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.839208"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 14:20:51.839208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.845897"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.845897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2379]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2379]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2379]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2379"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:51.850956"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.850956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:51.853134"], ["group_id", 2380], ["person_id", 2954], ["updated_at", "2014-10-13 14:20:51.853134"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2954]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:51.854565' WHERE "people"."id" = 2954 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:51.855219' WHERE "groups"."id" = 2380  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2954"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2953]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2954' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2954]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2954]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2953], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.125@digital.justice.gov.uk"], ["subject_id", 2954]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.125@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:20:51 +0100 From: support@example.com To: example.user.125@digital.justice.gov.uk Message-ID: <543bdfc3d3104_106ee3fdc61465be0224dd@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0039 has said that they believe the information on Surname-0040 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.871877"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 14:20:51.871877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.874508"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 14:20:51.874508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.881106"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.881106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2381]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2381]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2381]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2381"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:51.886152"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.886152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:51.888801"], ["group_id", 2382], ["person_id", 2956], ["updated_at", "2014-10-13 14:20:51.888801"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2956]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:51.890542' WHERE "people"."id" = 2956 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:51.891263' WHERE "groups"."id" = 2382  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2956"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2955]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2956' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2956]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2956]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2955], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.127@digital.justice.gov.uk"], ["subject_id", 2956]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to example.user.127@digital.justice.gov.uk (2.4ms) Date: Mon, 13 Oct 2014 15:20:51 +0100 From: support@example.com To: example.user.127@digital.justice.gov.uk Message-ID: <543bdfc3dbe9f_106ee3fdc61465be02256b@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0041 has said that they believe the information on Surname-0042 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2956]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.907950"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 14:20:51.907950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.910647"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 14:20:51.910647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.918339"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.918339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2383]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2383]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2383]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2383"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:51.923047"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.923047"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:51.925097"], ["group_id", 2384], ["person_id", 2958], ["updated_at", "2014-10-13 14:20:51.925097"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2958]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:51.926452' WHERE "people"."id" = 2958 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:51.927077' WHERE "groups"."id" = 2384  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2958"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2957]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2958' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2958]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2958]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2957], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.129@digital.justice.gov.uk"], ["subject_id", 2958]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 2.8ms Sent mail to example.user.129@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:20:51 +0100 From: support@example.com To: example.user.129@digital.justice.gov.uk Message-ID: <543bdfc3e535f_106ee3fdc61465be02263a@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0043 has said that they believe the information on Surname-0044 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 11ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.945459"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 14:20:51.945459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.947889"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 14:20:51.947889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.955288"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.955288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2385]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2385]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2385]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0045-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0045' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2385"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:51.960319"], ["name", "Group-0045"], ["slug", "group-0045"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:51.960319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:51.962527"], ["group_id", 2386], ["person_id", 2960], ["updated_at", "2014-10-13 14:20:51.962527"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2960]] SQL (0.7ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:51.964012' WHERE "people"."id" = 2960 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:51.965283' WHERE "groups"."id" = 2386  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"2960"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2959]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2960' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2960]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2960]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 2959], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.131@digital.justice.gov.uk"], ["subject_id", 2960]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 2.2ms Sent mail to example.user.131@digital.justice.gov.uk (2.5ms) Date: Mon, 13 Oct 2014 15:20:51 +0100 From: support@example.com To: example.user.131@digital.justice.gov.uk Message-ID: <543bdfc3eeddc_106ee3fdc61465be0227bf@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0045 has said that they believe the information on Surname-0046 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 12ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.985220"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 14:20:51.985220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.988612"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 14:20:51.988612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"2962"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2961]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '2962' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2962]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 2962]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:51.999188"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 14:20:51.999188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2963]] Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.009491"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 14:20:52.009491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2964]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.019427"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 14:20:52.019427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2965]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.029696"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.029696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2387]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2387]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2387]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0046-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0046' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2387"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.034236"], ["name", "Group-0046"], ["slug", "group-0046"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.034236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.039015"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 14:20:52.039015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2966]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.045727"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 14:20:52.045727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0054' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.049341"], ["slug", "surname-0054"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 14:20:52.049341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0054"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2967]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0054' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2968) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2968]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.063572"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 14:20:52.063572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0056' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.067212"], ["slug", "surname-0056"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 14:20:52.067212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0056"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2969]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0056' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2970) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2970]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.078109"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 14:20:52.078109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0058' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.081200"], ["slug", "surname-0058"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 14:20:52.081200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0058"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2971]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0058' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2972) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 2972]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.092397"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 14:20:52.092397"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0060' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.095658"], ["slug", "surname-0060"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 14:20:52.095658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0060"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2973]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0060' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2974) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.106655"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 14:20:52.106655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0062"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2975]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0062' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0062' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.113440"], ["slug", "surname-0062"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 14:20:52.113440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0062 Completed 302 Found in 6ms (ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.121351"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0063"], ["updated_at", "2014-10-13 14:20:52.121351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0064"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2977]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0064' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0064' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.127759"], ["slug", "surname-0064"], ["surname", "Surname-0064"], ["updated_at", "2014-10-13 14:20:52.127759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0064 Completed 302 Found in 5ms (ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.133671"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 14:20:52.133671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0066"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2979]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0066' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0066' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.140641"], ["slug", "surname-0066"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 14:20:52.140641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0066 Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.147304"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 14:20:52.147304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2981]] Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.156889"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 14:20:52.156889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2982]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.169982"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.169982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2389]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2389]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2389"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.175377"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.175377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.180806"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 14:20:52.180806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2983]] Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.194280"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 14:20:52.194280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2984]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.202549"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 14:20:52.202549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0072", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2985]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0072' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0072' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.211452"], ["image", nil], ["slug", "surname-0072"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 14:20:52.211452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0072/image/edit Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.221001"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 14:20:52.221001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.224192"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:20:52.224192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2987]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.234511"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 14:20:52.234511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.237965"], ["slug", "surname-0075"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 14:20:52.237965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0075"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2989]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0075' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2990) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.249891"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 14:20:52.249891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.253450"], ["slug", "surname-0077"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 14:20:52.253450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0077"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2991]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0077' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2992) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.278881"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.278881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2391]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2391]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0048-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0048' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0048' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2391"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.283573"], ["name", "Group-0048"], ["slug", "group-0048"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.283573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.288631"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 14:20:52.288631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.292226"], ["slug", "surname-0079"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 14:20:52.292226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0079"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2993]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0079' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2994) ORDER BY groups.name Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.303469"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 14:20:52.303469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0081' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.306755"], ["slug", "surname-0081"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 14:20:52.306755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.313097"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.313097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2393]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2393]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2393]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0049-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0049' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0049' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2393"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.318420"], ["name", "Group-0049"], ["slug", "group-0049"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.318420"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.321812"], ["group_id", 2394], ["person_id", 2996], ["updated_at", "2014-10-13 14:20:52.321812"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2996]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:52.323557' WHERE "people"."id" = 2996 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:52.324362' WHERE "groups"."id" = 2394  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0081"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2995]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0081' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2996) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.335273"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 14:20:52.335273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0083' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.338391"], ["slug", "surname-0083"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 14:20:52.338391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0084", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0083"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2997]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0083' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (2998) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0084' AND "people"."given_name" IS NULL AND ("people"."id" != 2998) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 2998 [["surname", "Surname-0084"], ["updated_at", "2014-10-13 14:20:52.347005"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0083 Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 2998]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.353340"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 14:20:52.353340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.356985"], ["slug", "surname-0086"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 14:20:52.356985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0087", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0086"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 2999]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0086' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3000) ORDER BY groups.name Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0087' AND "people"."given_name" IS NULL AND ("people"."id" != 3000) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 3000 [["surname", "Surname-0087"], ["updated_at", "2014-10-13 14:20:52.367116"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0086 Completed 302 Found in 9ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.373226"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 14:20:52.373226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.378156"], ["slug", "surname-0089"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 14:20:52.378156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0090", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3001]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0089' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3002) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0090' AND "people"."given_name" IS NULL AND ("people"."id" != 3002) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 3002 [["surname", "Surname-0090"], ["updated_at", "2014-10-13 14:20:52.387806"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0089 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.393627"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 14:20:52.393627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0092' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.396846"], ["slug", "surname-0092"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 14:20:52.396846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0092"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3003]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0092' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3004) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.408592"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 14:20:52.408592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.412107"], ["slug", "surname-0094"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 14:20:52.412107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0094"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3005]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0094' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3006) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.425984"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.425984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2395]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2395]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2395]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0050-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0050' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0050' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2395"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.430811"], ["name", "Group-0050"], ["slug", "group-0050"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.430811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.436105"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 14:20:52.436105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.439664"], ["slug", "surname-0096"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 14:20:52.439664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0096"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3007]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0096' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3008) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.451349"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 14:20:52.451349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0098' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.454936"], ["slug", "surname-0098"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 14:20:52.454936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0098"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3009]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0098' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3010) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.466395"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 14:20:52.466395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0100' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.470048"], ["slug", "surname-0100"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 14:20:52.470048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0101", "image"=>"#"}, "id"=>"surname-0100"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3011]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0100' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3012) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0101' AND "people"."given_name" IS NULL AND ("people"."id" != 3012) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3012]] SQL (0.2ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 3012 [["image", nil], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 14:20:52.479140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0100/image/edit Completed 302 Found in 9ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.485471"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 14:20:52.485471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.488054"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:20:52.488054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.490344"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:20:52.490344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3013]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3015) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 3015) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.502469"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 14:20:52.502469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3016]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.509709"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 14:20:52.509709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3017]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.519516"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.519516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2397]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2397]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2397]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0051-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0051' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2397"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.524304"], ["name", "Group-0051"], ["slug", "group-0051"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.524304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.529549"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 14:20:52.529549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0106' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.533115"], ["slug", "surname-0106"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 14:20:52.533115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0106"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3018]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0106' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3019) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.543609"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 14:20:52.543609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0108' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:52.546209"], ["slug", "surname-0108"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 14:20:52.546209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0108"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3020]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0108' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3021) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.558838"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.558838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2399]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2399]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2399]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0052-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0052' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0052' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2399"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:52.563853"], ["name", "Group-0052"], ["slug", "group-0052"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:52.563853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0109' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:52.843573"], ["image", "placeholder.png"], ["slug", "surname-0109"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 14:20:52.843573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0110' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.226290"], ["image", "placeholder.png"], ["slug", "surname-0110"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 14:20:53.226290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.694781"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 14:20:53.694781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0112' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.698448"], ["slug", "surname-0112"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 14:20:53.698448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.707665"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.707665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2401]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2401]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2401]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0053-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0053' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0053' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2401"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:53.713026"], ["name", "Group-0053"], ["slug", "group-0053"], ["team_email_address", "example.user.147@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.713026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.714554"], ["group_id", 2402], ["person_id", 3025], ["updated_at", "2014-10-13 14:20:53.714554"]] SQL (0.7ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:53.715516' WHERE "people"."id" = 3025 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:53.717302' WHERE "groups"."id" = 2402  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"484"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3024]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 484]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 484]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3025]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:53.724572' WHERE "people"."id" = 3025 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2402]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:53.726232' WHERE "groups"."id" = 2402  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 484]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.732533"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 14:20:53.732533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0114' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.738299"], ["slug", "surname-0114"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 14:20:53.738299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.746907"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.746907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2403]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2403]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2403]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0054-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0054' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0054' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2403"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:53.752548"], ["name", "Group-0054"], ["slug", "group-0054"], ["team_email_address", "example.user.149@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.752548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.753947"], ["group_id", 2404], ["person_id", 3027], ["updated_at", "2014-10-13 14:20:53.753947"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:53.754965' WHERE "people"."id" = 3027 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:53.756069' WHERE "groups"."id" = 2404  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"485"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3026]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 485]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 485]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3027]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:53.761631' WHERE "people"."id" = 3027 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2404]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:53.763126' WHERE "groups"."id" = 2404  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.784256"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.784256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.5ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.814933"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.814933"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:20:53.825793"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:53.825793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:20:53.838605"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:53.838605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:20:53.852599"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:53.852599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:20:53.862667"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:53.862667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:20:53.875472"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:53.875472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.883043"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 14:20:53.883043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3033]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.893305"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 14:20:53.893305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3034]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.902257"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 14:20:53.902257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.909465"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.909465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3035]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.918880"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 14:20:53.918880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.925275"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.925275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3036]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.933548"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 14:20:53.933548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0120' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.937256"], ["slug", "surname-0120"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 14:20:53.937256"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.946214"], ["event", "create"], ["item_id", 3038], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0120\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"249"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3037]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 249]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3038]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3038]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3038]] SQL (0.7ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:53.963812"], ["event", "destroy"], ["item_id", 3038], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3038\ngiven_name: \nsurname: Surname-0120\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:20:53.937256000 Z\nupdated_at: 2014-10-13 14:20:53.937256000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0119"]] PaperTrail::Version Load (0.5ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3038], ["item_type", "Peoplefinder::Person"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 17ms (ActiveRecord: 2.5ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3038]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.975511"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 14:20:53.975511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0122' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:53.979932"], ["slug", "surname-0122"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 14:20:53.979932"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.982421"], ["event", "create"], ["item_id", 3040], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0122\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.992136"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:53.992136"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:53.995477"], ["event", "create"], ["item_id", 2409], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.158@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2409]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2409]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2409]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0057-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0057' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0057' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2409"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:54.001091"], ["name", "Group-0057"], ["slug", "group-0057"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:54.001091"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.004863"], ["event", "create"], ["item_id", 2410], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0057\nteam_email_address:\n- \n- example.user.157@digital.justice.gov.uk\nancestry:\n- \n- '2409'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:54.006739"], ["group_id", 2410], ["person_id", 3040], ["updated_at", "2014-10-13 14:20:54.006739"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.009224"], ["event", "create"], ["item_id", 486], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 3040\ngroup_id:\n- \n- 2410\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:54.009952' WHERE "people"."id" = 3040 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:54.010815' WHERE "groups"."id" = 2410  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"254"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3039]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 254]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 486]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.020419"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 14:20:54.020419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:54.023395"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:20:54.023395"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.025335"], ["event", "create"], ["item_id", 3042], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3042]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3042]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.029727"], ["event", "destroy"], ["item_id", 3042], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3042\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:20:54.023395000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3042], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"256"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3041]] Peoplefinder::Version Load (0.4ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 256]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3042]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3042) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.023395"], ["id", 3042], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:20:54.039677"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:54.041662"], ["event", "create"], ["item_id", 3042], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.047631"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 14:20:54.047631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0125' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:54.051330"], ["slug", "surname-0125"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 14:20:54.051330"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.053384"], ["event", "create"], ["item_id", 3044], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0125\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.060927"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:54.060927"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.062756"], ["event", "create"], ["item_id", 2411], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.160@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2411]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2411]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2411]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0058-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0058' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2411"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:54.067896"], ["name", "Group-0058"], ["slug", "group-0058"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:54.067896"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.070445"], ["event", "create"], ["item_id", 2412], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0058\nteam_email_address:\n- \n- example.user.159@digital.justice.gov.uk\nancestry:\n- \n- '2411'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:54.072080"], ["group_id", 2412], ["person_id", 3044], ["updated_at", "2014-10-13 14:20:54.072080"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.074021"], ["event", "create"], ["item_id", 487], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 3044\ngroup_id:\n- \n- 2412\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:54.074751' WHERE "people"."id" = 3044 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:54.075511' WHERE "groups"."id" = 2412  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 487]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.077584"], ["event", "destroy"], ["item_id", 487], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 487\ngroup_id: 2412\nperson_id: 3044\nrole: \ncreated_at: &1 2014-10-13 14:20:54.072080000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 487], ["item_type", "Peoplefinder::Membership"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:54.079138' WHERE "people"."id" = 3044 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:54.079695' WHERE "groups"."id" = 2412  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"262"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3043]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 262]] Redirected to http://test.host/audit_trail Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 487]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:54.092352"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:54.092352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:54.095182"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:20:54.095182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3045]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:55.113017"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:55.113017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3046]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3046]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3046]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3046) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.2ms | ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3046]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 6.3ms | ActiveRecord: 0.8ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3046]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3045) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.4ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3045]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (5.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 14.9ms | ActiveRecord: 1.2ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.1ms) DELETE FROM "versions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:55.266051"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:55.266051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3047]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3047]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3047]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3047) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (44.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 58ms (Views: 53.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:55.338610"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.338610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2414]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2414]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2414]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2414"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:55.343939"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.343939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2415]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2415]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2415]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2414/2415"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:55.348666"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.348666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2416]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2416]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2416]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2414/2415/2416"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:55.356112"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.356112"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3047]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2414) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2414) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2414]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 1.8ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3047]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2415) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2414, 2415) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2415]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.5ms | ActiveRecord: 2.2ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3047]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2416) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2414, 2415, 2416) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2416]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415/2416' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415/2416' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2414/2415/2416' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:55.433782"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.433782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2418]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2418]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2418]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2418"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:55.440297"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.440297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2419]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2419]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2419]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2418/2419"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:55.445503"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.445503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2420]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2420]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2420]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2418/2419/2420"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:55.450145"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:55.450145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:55.905717"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:55.905717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3048]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:55 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3048) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 33.6ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3048]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2421) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2418, 2419, 2420, 2421) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (4.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2421]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2418/2419/2420/2421' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2418/2419/2420/2421' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2421]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:56.230508"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:56.230508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3049]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3049]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3049]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3049) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.7ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:56.295892"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.295892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2422]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2422]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2422]]  (0.6ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2422"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:56.302606"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.302606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2423]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2423]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2423]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2422/2423"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:56.308037"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.308037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2424]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2424]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2424]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2422/2423/2424"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:56.313454"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.313454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:56.316333"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:20:56.316333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:56.318223"], ["group_id", 2423], ["person_id", 3050], ["updated_at", "2014-10-13 14:20:56.318223"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:56.318953' WHERE "people"."id" = 3050 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:56.319676' WHERE "groups"."id" = 2423  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:56.322143"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:20:56.322143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:56.323604"], ["group_id", 2423], ["person_id", 3051], ["updated_at", "2014-10-13 14:20:56.323604"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:56.324191' WHERE "people"."id" = 3051 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:56.324741' WHERE "groups"."id" = 2423  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:56.327026"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:20:56.327026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:56.328498"], ["group_id", 2423], ["person_id", 3052], ["updated_at", "2014-10-13 14:20:56.328498"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:56.329100' WHERE "people"."id" = 3052 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:56.329625' WHERE "groups"."id" = 2423  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3049]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2423) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2422, 2423) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2423]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2422/2423' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2422/2423' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2422/2423' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.8ms | ActiveRecord: 2.3ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3049]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2423) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2422, 2423) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2423 OR "groups"."ancestry" ILIKE '2422/2423/%') OR "groups"."ancestry" = '2422/2423')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2425,2424,2423) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:56.397495"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.397495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2426]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2426]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2426]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2426"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:56.403406"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.403406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2427]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2427]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2427]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2426/2427"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:56.408966"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.408966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2428]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2428]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2428]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2426/2427/2428"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:56.414720"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:56.414720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:56.872655"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:56.872655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3053]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3053]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3053]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3053) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.7ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3053]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:56 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3053]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3053]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:57.127834"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:57.127834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3054]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3054]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3054]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3054) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 38.0ms | ActiveRecord: 1.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.185219"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.185219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2430]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2430]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2430]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2430"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.190595"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.190595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2431]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2431]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2431]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2430/2431"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:57.195679"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.195679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2432]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2432]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2432]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2430/2431/2432"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:57.202306"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.202306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.206166"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:20:57.206166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.207941"], ["group_id", 2433], ["person_id", 3055], ["updated_at", "2014-10-13 14:20:57.207941"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.208663' WHERE "people"."id" = 3055 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.209321' WHERE "groups"."id" = 2433  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.211648"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:20:57.211648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.213049"], ["group_id", 2433], ["person_id", 3056], ["updated_at", "2014-10-13 14:20:57.213049"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.213600' WHERE "people"."id" = 3056 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.214134' WHERE "groups"."id" = 2433  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.216454"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:20:57.216454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.218409"], ["group_id", 2433], ["person_id", 3057], ["updated_at", "2014-10-13 14:20:57.218409"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.219411' WHERE "people"."id" = 3057 [1mSQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.220156' WHERE "groups"."id" = 2433  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3054]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2433) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2430, 2431, 2432, 2433) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.4ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2433]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2430/2431/2432/2433' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2430/2431/2432/2433' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2433]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (18.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:57.278443"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:57.278443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3058]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3058]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3058]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3058) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.330608"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.330608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2434]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2434]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2434]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2434"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.336296"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.336296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2435]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2435]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2435]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2434/2435"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:57.341939"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.341939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2436]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2436]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2436]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2434/2435/2436"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:57.346775"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.346775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.349692"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:20:57.349692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.351505"], ["group_id", 2435], ["person_id", 3059], ["updated_at", "2014-10-13 14:20:57.351505"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.352190' WHERE "people"."id" = 3059 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.352894' WHERE "groups"."id" = 2435  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.355500"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:20:57.355500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.357371"], ["group_id", 2435], ["person_id", 3060], ["updated_at", "2014-10-13 14:20:57.357371"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.358176' WHERE "people"."id" = 3060 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.358867' WHERE "groups"."id" = 2435  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.361789"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:20:57.361789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.363433"], ["group_id", 2435], ["person_id", 3061], ["updated_at", "2014-10-13 14:20:57.363433"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.364133' WHERE "people"."id" = 3061 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.364700' WHERE "groups"."id" = 2435  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3058]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2435) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2434, 2435) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2435]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2434/2435' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2434/2435' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2434/2435' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:57.396989"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:57.396989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3062]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3062]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3062]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3062) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.451904"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.451904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2438]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2438]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2438]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2438"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.457663"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.457663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2439]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2439]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2439]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2438/2439"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:57.462889"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.462889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2440]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2440]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2440]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2438/2439/2440"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:57.468598"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.468598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3062]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2441) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2438, 2439, 2440, 2441) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.3ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2441]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2438/2439/2440/2441' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2438/2439/2440/2441' ORDER BY "groups"."name" ASC SQL (0.7ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2441]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:57.501663"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:57.501663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3063]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3063]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3063]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3063) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.2ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.556424"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.556424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2442"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.571467"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.571467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2443]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2443]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2443]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2442/2443"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:20:57.576847"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.576847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2444]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2444]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2444]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2442/2443/2444"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:20:57.582100"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.582100"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2442) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2442 [["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.586972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2442"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.591794"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.591794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3063]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2446) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2442, 2446) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2446]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2442/2446' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2442/2446' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2446]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 2.0ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3063]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2446) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2442, 2446) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2442]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2442) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2442/2446' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.1ms | ActiveRecord: 2.4ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3063]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2446) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2442, 2446) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.5ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2446 OR "groups"."ancestry" ILIKE '2442/2446/%') OR "groups"."ancestry" = '2442/2446')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.9ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2446) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.2ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.672252"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 14:20:57.672252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.680005"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.680005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2447]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2447]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2447]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0059-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0059' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0059' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2447"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.685788"], ["name", "Group-0059"], ["slug", "group-0059"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 14:20:57.685788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.688255"], ["group_id", 2448], ["person_id", 3064], ["updated_at", "2014-10-13 14:20:57.688255"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3064]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.689825' WHERE "people"."id" = 3064 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.690604' WHERE "groups"."id" = 2448  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3064]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0129' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.695478"], ["slug", "surname-0129"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 14:20:57.695478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3065]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.699875"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 14:20:57.699875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3066]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.704966"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:20:57.704966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3067]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.715571"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.715571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2449) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2449 [["team_email_address", "example.user.200@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.719316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2449) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2449 [["team_email_address", "example.user.202@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.722475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2449) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2449 [["team_email_address", "example.user.204@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.725391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.736763"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.206@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.736763"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2450) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2450 [["team_email_address", "example.user.208@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.740756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2450) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2450 [["team_email_address", "example.user.210@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.744315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2450) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2450 [["team_email_address", "example.user.212@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.747326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2450) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2450 [["team_email_address", "example.user.214@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.755066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.762648"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.216@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.762648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2451) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2451 [["team_email_address", "example.user.218@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.765629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2451) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2451 [["team_email_address", "example.user.220@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.768952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2451) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2451 [["team_email_address", "example.user.222@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.771701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.782086"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.224@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.782086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2452) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2452 [["team_email_address", "example.user.226@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.786200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0131' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.792241"], ["slug", "surname-0131"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 14:20:57.792241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.799093"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.228@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.799093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2453"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.805057"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.805057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2453) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2453 [["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.808118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2453]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2453"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:57.812323"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:57.812323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.815061"], ["group_id", 2455], ["person_id", 3068], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:20:57.815061"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3068]] SQL (0.6ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.817705' WHERE "people"."id" = 3068 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.819314' WHERE "groups"."id" = 2455  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:57.821512"], ["group_id", 2454], ["person_id", 3068], ["role", "Designer"], ["updated_at", "2014-10-13 14:20:57.821512"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3068]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:57.823209' WHERE "people"."id" = 3068 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:57.823887' WHERE "groups"."id" = 2454  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3068]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0132' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.829494"], ["slug", "surname-0132"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 14:20:57.829494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0133' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.832899"], ["slug", "surname-0133"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 14:20:57.832899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:57.840090"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:57.840090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3071]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3071) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0134' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:57.887046"], ["slug", "surname-0134"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 14:20:57.887046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0134/edit" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0134"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3072) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 47.3ms | ActiveRecord: 1.1ms) Started PATCH "/people/surname-0134" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0134", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0134"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3072) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0134' AND "people"."given_name" = '' AND ("people"."id" != 3072) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3072]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 3072 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:20:57.964246"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:57.974364"], ["event", "update"], ["item_id", 3072], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3072\ngiven_name: \nsurname: Surname-0134\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:20:57.887046000 Z\nupdated_at: 2014-10-13 14:20:57.887046000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3072\n given_name: ''\n surname: Surname-0134\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 14:20:57.964246000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0134\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3072\n given_name: ''\n surname: Surname-0134\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 14:20:57.887046000 Z\n updated_at: &2 2014-10-13 14:20:57.964246000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0134\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3072\n given_name: ''\n surname: Surname-0134\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0134\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70215842355840\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3072\n given_name: ''\n surname: Surname-0134\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0134\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413210057-67310-6903\n cache_id: 1413210057-67310-6903\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210057-67310-6903/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70215842351380\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3072\n given_name: ''\n surname: Surname-0134\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0134\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413210057-67310-6903\n cache_id: 1413210057-67310-6903\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210057-67310-6903/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413210057-67310-6903\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210057-67310-6903/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0134/image/edit Completed 302 Found in 27ms (ActiveRecord: 3.0ms) Started GET "/people/surname-0134/image/edit" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0134"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:57 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3071]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3072]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 15.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.026672"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.026672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3073]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3073) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.7ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (1.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:58.076221"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 14:20:58.076221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3074) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.4ms | ActiveRecord: 1.0ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3074) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 3074) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3074 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 14:20:58.142300"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:58.145701"], ["event", "update"], ["item_id", 3074], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3074\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:20:58.076221000 Z\nupdated_at: 2014-10-13 14:20:58.076221000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 17ms (ActiveRecord: 2.8ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3074) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3074]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 1.1ms) Started POST "/audit_trail/undo/264" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"264"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 264]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3074]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3074) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3074 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 14:20:58.193169"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:58.196316"], ["event", "update"], ["item_id", 3074], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3074\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:20:58.076221000 Z\nupdated_at: 2014-10-13 14:20:58.142300000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3073]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3074]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3074]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.9ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3074]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.218344"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.218344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3075]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3075) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (16.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 53ms (Views: 48.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:58.279681"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:20:58.279681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3076) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3076) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3076]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.335236"], ["event", "destroy"], ["item_id", 3076], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3076\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:20:58.279681000 Z\nupdated_at: 2014-10-13 14:20:58.279681000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3076], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 13ms (ActiveRecord: 2.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 13.4ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3076]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/266" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"266"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 266]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3076]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3076) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.279681"], ["given_name", "Greg"], ["id", 3076], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:20:58.383329"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.385452"], ["event", "create"], ["item_id", 3076], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3075]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3076]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3076]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.409826"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.409826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3077]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3077) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.0ms | ActiveRecord: 1.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:58.464912"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:58.464912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2456]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2456]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2456]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2456"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:58.471466"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:58.471466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:58.475057"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:20:58.475057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.477798"], ["group_id", 2457], ["leader", "t"], ["person_id", 3078], ["role", "Jefe"], ["updated_at", "2014-10-13 14:20:58.477798"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3078]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:58.479860' WHERE "people"."id" = 3078 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:58.480746' WHERE "groups"."id" = 2457  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.3ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3078) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2456, 2457) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2456, 2457) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3078]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 40.7ms | ActiveRecord: 2.5ms) Started DELETE "/memberships/500?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"500"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]] Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 500]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 500]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.552410"], ["event", "destroy"], ["item_id", 500], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 500\ngroup_id: 2457\nperson_id: 3078\nrole: Jefe\ncreated_at: 2014-10-13 14:20:58.477798000 Z\nupdated_at: 2014-10-13 14:20:58.477798000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 500], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3078]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:20:58.555430' WHERE "people"."id" = 3078 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2457]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:20:58.557080' WHERE "groups"."id" = 2457  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3078) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3077]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 500]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3078]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2457]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.2ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.624491"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.624491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3079]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3079) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 42ms (Views: 36.2ms | ActiveRecord: 1.2ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.5ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:20:58.725436"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:20:58.725436"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.727918"], ["event", "create"], ["item_id", 3080], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3080) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3080]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.1ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/269" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"269"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]] Peoplefinder::Version Load (0.1ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 269]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3080]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3080]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3080]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.773904"], ["event", "destroy"], ["item_id", 3080], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3080\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:20:58.725436000 Z\nupdated_at: 2014-10-13 14:20:58.725436000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3080], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3079]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3080]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.2ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3080]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.798388"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.798388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3081]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3081) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 54ms (Views: 48.7ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 13.1ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:58.887058"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 14:20:58.887058"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.889486"], ["event", "create"], ["item_id", 2458], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2458) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2458) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2458]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2458' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2458' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2458]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3081]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2458]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.9ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:58.936864"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:58.936864"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3082]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3082) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:58.991242"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:58.991242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2459"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:58.996411"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:58.996411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:20:58 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2460) ORDER BY people.surname Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2459, 2460) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2459) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2459/2460' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.7ms | ActiveRecord: 2.5ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"2459", "team_email_address"=>"example.user.233@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2460) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2459]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2460) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 2460) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2460 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 14:20:59.042836"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:20:59.046015"], ["event", "update"], ["item_id", 2460], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2460\nname: original name\ncreated_at: 2014-10-13 14:20:58.996411000 Z\nupdated_at: 2014-10-13 14:20:58.996411000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '2459'\nancestry_depth: 1\nteam_email_address: example.user.233@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 15ms (ActiveRecord: 3.1ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2460) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2459, 2460) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.7ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2460]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2459/2460' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2459/2460' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2460]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 2.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3082]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2460]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:59.093393"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:59.093393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3083]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3083) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (35.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 45.2ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:59.157131"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:59.157131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2461"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:59.161924"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:59.161924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2462) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2461, 2462) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2461) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2461/2462' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.9ms | ActiveRecord: 2.2ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2462) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2461]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2461/2462/%' OR "groups"."ancestry" = '2461/2462')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2461/2462' ORDER BY "groups"."name" ASC SQL (0.3ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2462]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:59.202573"], ["event", "destroy"], ["item_id", 2462], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2462\nname: original name\ncreated_at: 2014-10-13 14:20:59.161924000 Z\nupdated_at: 2014-10-13 14:20:59.161924000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '2461'\nancestry_depth: 1\nteam_email_address: example.user.235@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2462], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 13ms (ActiveRecord: 2.8ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2461) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2461) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2461]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2461' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2461' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2461]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 2.1ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3083]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2462]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:59.254484"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:59.254484"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:59.256902"], ["event", "create"], ["item_id", 2463], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.238@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2463]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2463]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2463"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:20:59.261833"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:20:59.261833"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:59.263834"], ["event", "create"], ["item_id", 2464], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.237@digital.justice.gov.uk\nancestry:\n- \n- '2463'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:20:59.266819"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:20:59.266819"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:20:59.268685"], ["event", "create"], ["item_id", 3084], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:59.712574"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:20:59.712574"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:20:59.714748"], ["event", "create"], ["item_id", 3085], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3085]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3085) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.9ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3084) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 15:20:59 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"2464", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3084) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 3084) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 3084 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:20:59.996646"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:00.000729"], ["event", "update"], ["item_id", 3084], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3084\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:20:59.266819000 Z\nupdated_at: 2014-10-13 14:20:59.266819000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.001778"], ["group_id", 2464], ["person_id", 3084], ["role", "Jefe"], ["updated_at", "2014-10-13 14:21:00.001778"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.003465"], ["event", "create"], ["item_id", 501], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 2464\nperson_id:\n- \n- 3084\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3084]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:00.005095' WHERE "people"."id" = 3084 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2464]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:00.006706' WHERE "groups"."id" = 2464  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/bob Completed 302 Found in 23ms (ActiveRecord: 3.5ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3084) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2463, 2464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (13.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (13.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (15.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2463, 2464) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 1.7ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]]  (0.4ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.4ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 501]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3084]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (2.0ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3084]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3085]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3084]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2464]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2463]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 17.0ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.188379"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:00.188379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.192556"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:21:00.192556"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.198360"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:21:00.198360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.202154"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:21:00.202154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.208310"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 14:21:00.208310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3090]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.215681"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 14:21:00.215681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.223842"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.223842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2465]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2465]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2465]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2465"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.229046"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.229046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3091]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.237931"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 14:21:00.237931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.244940"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.241@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.244940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3092]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 3ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.254702"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 14:21:00.254702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3093]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.262486"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 14:21:00.262486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3094]] Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.271758"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 14:21:00.271758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.280617"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.243@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.280617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2468]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2468]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2468]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2468"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.287215"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.242@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.287215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0076"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3095]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0076' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2469) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2468]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2468]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2468/2469/%' OR "groups"."ancestry" = '2468/2469')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2468/2469' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2469]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.2ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.302767"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 14:21:00.302767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.307055"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.307055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2470]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2470"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.313601"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.313601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0078"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3096]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0078' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2471) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2470]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2470]]  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2470/2471/%' OR "groups"."ancestry" = '2470/2471')) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2470/2471' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2471]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0077 Completed 302 Found in 13ms (ActiveRecord: 3.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.333312"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 14:21:00.333312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.342322"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.342322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2472]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2472]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2472]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2472"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.347421"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.347421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0079"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3097]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0079' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2473) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.358306"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 14:21:00.358306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0080", "team_email_address"=>"example.user.248@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3098]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.366856"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.366856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0080 Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.372316"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 14:21:00.372316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0081", "team_email_address"=>"example.user.249@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3099]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.377866"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.377866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0081 Completed 302 Found in 4ms (ActiveRecord: 0.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.382951"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 14:21:00.382951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0082", "team_email_address"=>"example.user.250@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3100]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.389627"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.389627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0082 Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.394271"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 14:21:00.394271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3101]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.403544"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 14:21:00.403544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3102]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.414194"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 14:21:00.414194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3103]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.424297"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 14:21:00.424297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.431409"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.431409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2477]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2477]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2477]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2477"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.436664"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.436664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0083"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3104]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0083' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2478) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.447168"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 14:21:00.447168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.454933"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.454933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2479"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.459495"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.459495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0085", "team_email_address"=>"example.user.255@digital.justice.gov.uk"}, "id"=>"group-0084"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3105]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0084' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2480) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2479]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2480) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0085' AND "groups"."id" != 2480) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 2480 [["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.472859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0085 Completed 302 Found in 12ms (ActiveRecord: 2.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2480]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.478786"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 14:21:00.478786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.486387"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.486387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2481]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2481]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2481]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2481"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.491231"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.491231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0086", "team_email_address"=>"example.user.256@digital.justice.gov.uk"}, "id"=>"group-0086"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3106]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0086' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2482) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0086' AND "groups"."id" != 2482) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0086 Completed 302 Found in 10ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.507080"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 14:21:00.507080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.514276"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.514276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2483]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2483]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2483]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2483"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.519354"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.519354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0087", "team_email_address"=>"example.user.258@digital.justice.gov.uk"}, "id"=>"group-0087"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3107]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0087' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2484) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0087' AND "groups"."id" != 2484) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0087 Completed 302 Found in 7ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.546049"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 14:21:00.546049"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.554989"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.554989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2485"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.559926"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.559926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0088"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3108]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0088' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2486) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2485]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2486) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2486) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.577367"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 14:21:00.577367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.585062"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.585062"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2487"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.592203"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.592203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0089"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3109]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0089' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2488) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2487]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2488) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2488) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.609892"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 14:21:00.609892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.618169"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.618169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2489"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:00.623035"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:00.623035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0090"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3110]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0090' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2490) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2489]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2490) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2490) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.643835"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:00.643835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3111]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3111]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3111]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3111) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.690128"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:00.690128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:00.691805"], ["updated_at", "2014-10-13 14:21:00.691805"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "dafd4843-be43-4331-a778-2bc9dcd98f53"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/dafd4843-be43-4331-a778-2bc9dcd98f53?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"dafd4843-be43-4331-a778-2bc9dcd98f53"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = 'dafd4843-be43-4331-a778-2bc9dcd98f53' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3112]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3112) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.721673"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:00.721673"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3113]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3113) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.5ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:00.769554"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-c826067b-025a-445d-b727-8d6d4c1de116"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 14:21:00.769554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-c826067b-025a-445d-b727-8d6d4c1de116/edit" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-c826067b-025a-445d-b727-8d6d4c1de116"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c826067b-025a-445d-b727-8d6d4c1de116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3114) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-c826067b-025a-445d-b727-8d6d4c1de116" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-c826067b-025a-445d-b727-8d6d4c1de116"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c826067b-025a-445d-b727-8d6d4c1de116' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3114) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3114]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.7ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3113]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (19.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 24.6ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.861726"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:00.861726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3115]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3115) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.9ms | ActiveRecord: 1.3ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:00.908407"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:00.908407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3116) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3116) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3116 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:00.985352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:00 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3115]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3116) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.3ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.013405"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.013405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3117]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3117) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:01.061597"], ["email", "test.user"], ["slug", "test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 14:21:01.061597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc/edit" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3118) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-a6d8cf94-c1bd-427f-9f67-c9592141e1cc' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3118) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3118]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 1.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3117]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.150906"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.150906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3119]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3119]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3119]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3119) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3119]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3119]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:01.249645"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:01.249645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3119]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3120) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.277559"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.277559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3121]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3121]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3121]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3121) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 33.9ms | ActiveRecord: 1.3ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3121]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 34ms (Views: 31.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3121]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:01.381209"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-0f4b89dd-b081-4e1c-bcd8-b6a53f012762"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:01.381209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-0f4b89dd-b081-4e1c-bcd8-b6a53f012762 Completed 302 Found in 22ms (ActiveRecord: 1.7ms) Started GET "/people/test-user-0f4b89dd-b081-4e1c-bcd8-b6a53f012762" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-0f4b89dd-b081-4e1c-bcd8-b6a53f012762"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3121]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-0f4b89dd-b081-4e1c-bcd8-b6a53f012762' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3122) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.420684"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.420684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3123]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3123]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3123]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3123) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3123]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 35ms (Views: 31.1ms | ActiveRecord: 0.5ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3123]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:01.525465"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-07d685cf-fc94-414f-a62d-1ea9f5d27627"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:01.525465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-07d685cf-fc94-414f-a62d-1ea9f5d27627 Completed 302 Found in 11ms (ActiveRecord: 1.7ms) Started GET "/people/test-user-07d685cf-fc94-414f-a62d-1ea9f5d27627" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-07d685cf-fc94-414f-a62d-1ea9f5d27627"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3123]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-07d685cf-fc94-414f-a62d-1ea9f5d27627' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3124) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.555608"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.555608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3125]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3125) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 37.2ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:01.606003"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 14:21:01.606003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3126) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.4ms | ActiveRecord: 1.1ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3126) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 21.3ms Sent mail to bob.smith@digital.justice.gov.uk (3.0ms) Date: Mon, 13 Oct 2014 15:21:01 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfcda760b_106ee3fdc61465be022831@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3126]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 36ms (ActiveRecord: 1.8ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 4ms (ActiveRecord: 0.8ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3125]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.5ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.720855"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.720855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3127]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3127) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.769851"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:01.769851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 36.6ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3128) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3128) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3128 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:01.848455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:01.851555"], ["updated_at", "2014-10-13 14:21:01.851555"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "21cbe54b-3af3-4544-9e64-ef1a6dca07dd"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 8.9ms Sent mail to bob.smith@digital.justice.gov.uk (3.1ms) Date: Mon, 13 Oct 2014 15:21:01 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfcdd21e1_106ee3fdc61465be022932@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/21cbe54b-3af3-4544-9e64-ef1a6dca07dd?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 25ms (ActiveRecord: 2.5ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3127]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3128) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 1.7ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:01.897465"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:01.897465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3129]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3129) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0159' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:01.945530"], ["slug", "surname-0159"], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 14:21:01.945530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0159/edit" for 127.0.0.1 at 2014-10-13 15:21:01 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0159"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0159' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3130) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (17.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (38.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 48.7ms | ActiveRecord: 1.5ms) Started DELETE "/people/surname-0159" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0159"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0159' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3130) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3130]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3129]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 15.2ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.045910"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.045910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3131]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3131) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 36.5ms | ActiveRecord: 1.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.099479"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:02.099479"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3132) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf/edit" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3132) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.8ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3132) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3132) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3132 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:02.182482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf Completed 302 Found in 12ms (ActiveRecord: 2.2ms) Started GET "/people/test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3131]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-ff79a1ff-75d6-490d-825b-75d02fc993bf' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3132) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.210481"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.210481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3133]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3133) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 47.9ms | ActiveRecord: 1.6ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.273805"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:02.273805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3134) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3134) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 36.3ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3134) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3134) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3134 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:02.356492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:02.359585"], ["updated_at", "2014-10-13 14:21:02.359585"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3f03fff2-2bb2-40ce-9258-cbb49882aefc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 7.0ms Sent mail to bob.smith@digital.justice.gov.uk (2.8ms) Date: Mon, 13 Oct 2014 15:21:02 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfce59800_106ee3fdc61465be023031@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/3f03fff2-2bb2-40ce-9258-cbb49882aefc?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 24ms (ActiveRecord: 2.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3133]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3134) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.396291"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.396291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3135]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3135) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 34.9ms | ActiveRecord: 1.5ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.446954"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:02.446954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3136) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.2ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3136) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 34.9ms | ActiveRecord: 1.8ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3136) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3136) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3136 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:02.529423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3135]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3136) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.5ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.578251"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.578251"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3137]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3137]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3137]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3137) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3137]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 32.7ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3137]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:02.681649"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-68cf8419-2296-4247-8b2b-21dcd611d0c6"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:02.681649"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-68cf8419-2296-4247-8b2b-21dcd611d0c6 Completed 302 Found in 10ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-68cf8419-2296-4247-8b2b-21dcd611d0c6" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-68cf8419-2296-4247-8b2b-21dcd611d0c6"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3137]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-68cf8419-2296-4247-8b2b-21dcd611d0c6' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3138) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.712025"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.712025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3139]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3139]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3139]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3139) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 38.8ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3139]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 34ms (Views: 31.7ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3139]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:02.831567"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:02.831567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:02.834387"], ["updated_at", "2014-10-13 14:21:02.834387"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "1341cafd-73ed-48d3-b2e6-275820d305cc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 7.0ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:02 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfcecd5ac_106ee3fdc61465be0231b4@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/1341cafd-73ed-48d3-b2e6-275820d305cc?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 31ms (ActiveRecord: 1.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3139]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3140) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:02.872974"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:02.872974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3141]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3141) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:02.922415"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 14:21:02.922415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2/edit" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3142) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-64020a84-fe5a-48ae-8b86-daa7b5672fd2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3142) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3142]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 8ms (ActiveRecord: 2.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3141]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 13.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:02 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.005368"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:03.005368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3143]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3143) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.055255"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:03.055255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3144) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.2ms | ActiveRecord: 1.1ms) Started GET "/people/test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056/edit" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3144) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3144) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3144) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3144 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:03.133802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056 Completed 302 Found in 12ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3143]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-f18da1d8-8ff3-43a8-8c8c-ef69a1607056' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3144) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.160940"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:03.160940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3145]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3145) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 32.9ms | ActiveRecord: 1.5ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.208325"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:03.208325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3146) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3146) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.6ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3146) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3146) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 3146 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:03.285248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 2.0ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3145]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3146) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.310639"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:03.310639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3147]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3147) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.4ms | ActiveRecord: 1.5ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.360022"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:03.360022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3148) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.5ms | ActiveRecord: 0.9ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3148) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.0ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3148) ORDER BY groups.name Peoplefinder::Person Load (1.0ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3148) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3148 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:03.439023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.442116"], ["updated_at", "2014-10-13 14:21:03.442116"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "62cf3f57-9140-4aca-b7ec-07cff7d6055e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 6.4ms Sent mail to bob.smithe@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:21:03 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bdfcf6d7b8_106ee3fdc61465be02327a@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/62cf3f57-9140-4aca-b7ec-07cff7d6055e?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.450500"], ["updated_at", "2014-10-13 14:21:03.450500"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "a18032d2-f9fd-48e6-b692-6ef458f722dd"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 2.2ms Sent mail to bob.smith@digital.justice.gov.uk (1.7ms) Date: Mon, 13 Oct 2014 15:21:03 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfcf6e933_106ee3fdc61465be02338b@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/a18032d2-f9fd-48e6-b692-6ef458f722dd?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 26ms (ActiveRecord: 3.3ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3147]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3148) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.478045"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:03.478045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3149]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3149) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 30.4ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.523337"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:03.523337"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3150) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.0ms | ActiveRecord: 0.9ms) Started GET "/people/test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba/edit" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3150) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.1ms) Started PATCH "/people/test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3150) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3150) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3150 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:03.601946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.604585"], ["updated_at", "2014-10-13 14:21:03.604585"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "217ad676-4942-4c7c-a159-5273fa8844ee"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 2.9ms Sent mail to bob.smith@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:03 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfcf945b7_106ee3fdc61465be0234d9@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/217ad676-4942-4c7c-a159-5273fa8844ee?desired_path=%2Fpeople%2Ftest-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba. Redirected to http://www.example.com/people/test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba Completed 302 Found in 17ms (ActiveRecord: 2.2ms) Started GET "/people/test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3149]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e0db5d0b-6ab3-41a4-87e6-1dda6c5042ba' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3150) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.8ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.637457"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.637457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2491]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2491]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2491]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2491"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.642346"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.642346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2491/2492"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.648592"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.648592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2491/2492/2493"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.657007"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.657007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2493]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2491/2492/2493"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.662559"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.662559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2491/2492"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.669659"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.669659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2492]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.679741"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.679741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2497]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2497]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2497]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2497"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.683948"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.683948"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2497/2498"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.690490"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.690490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2497/2498/2499"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.696566"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.696566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2499]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2497/2498/2499"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.702781"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.702781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2498]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2497/2498"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.708197"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.708197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2498 OR "groups"."ancestry" ILIKE '2497/2498/%') OR "groups"."ancestry" = '2497/2498')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.715935"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.715935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2503]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2503]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2503]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2503"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.721239"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.721239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2503/2504"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.726026"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.726026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2503/2504/2505"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.730479"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.730479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2505]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2503/2504/2505"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:03.736256"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.736256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2504]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2503/2504"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:03.741316"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.741316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2504 OR "groups"."ancestry" ILIKE '2503/2504/%') OR "groups"."ancestry" = '2503/2504')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0161' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.749083"], ["slug", "surname-0161"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 14:21:03.749083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.755388"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.755388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2509]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2509]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2509]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2509"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.760078"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.760078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.761326"], ["group_id", 2510], ["person_id", 3151], ["updated_at", "2014-10-13 14:21:03.761326"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:03.761935' WHERE "people"."id" = 3151 SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:03.762535' WHERE "groups"."id" = 2510  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0162' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.775759"], ["slug", "surname-0162"], ["surname", "Surname-0162"], ["updated_at", "2014-10-13 14:21:03.775759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.782202"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.782202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2511]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2511]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2511]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2511"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.786355"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.786355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.788041"], ["group_id", 2512], ["person_id", 3152], ["updated_at", "2014-10-13 14:21:03.788041"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:03.788772' WHERE "people"."id" = 3152 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:03.789411' WHERE "groups"."id" = 2512  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0163' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.792863"], ["slug", "surname-0163"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 14:21:03.792863"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.798785"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.798785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2513]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2513]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2513]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2513"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.803324"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.288@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.803324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.804728"], ["group_id", 2514], ["person_id", 3153], ["updated_at", "2014-10-13 14:21:03.804728"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:03.805342' WHERE "people"."id" = 3153 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:03.805942' WHERE "groups"."id" = 2514  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:03.833752"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:03.833752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3154]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3154) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (12.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (65.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 83ms (Views: 76.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:03.930544"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.930544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2515]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2515]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2515]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2515"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:03.936026"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:03.936026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0164' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.939066"], ["slug", "surname-0164"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 14:21:03.939066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:03.941878"], ["group_id", 2516], ["person_id", 3155], ["updated_at", "2014-10-13 14:21:03.941878"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3155]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:03.943303' WHERE "people"."id" = 3155 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:03.943967' WHERE "groups"."id" = 2516  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0164" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0164"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3155) ORDER BY groups.name Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2515, 2516) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2515, 2516) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 14.3ms | ActiveRecord: 1.7ms) Started GET "/people/surname-0164/reported_profiles/new" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 13.9ms | ActiveRecord: 0.6ms) Started POST "/people/surname-0164/reported_profiles" for 127.0.0.1 at 2014-10-13 15:21:03 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3155]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 3154], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.290@digital.justice.gov.uk"], ["subject_id", 3155]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.290@digital.justice.gov.uk (2.6ms) Date: Mon, 13 Oct 2014 15:21:04 +0100 From: support@example.com To: example.user.290@digital.justice.gov.uk Message-ID: <543bdfd027f_106ee3fdc61465be0235ec@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0164 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0164 Redirected to http://www.example.com/people/surname-0164 Completed 302 Found in 10ms (ActiveRecord: 1.0ms) Started GET "/people/surname-0164" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3154]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3155) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2515, 2516) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2515, 2516) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:04.032328"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:04.032328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3156]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3156) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:04.082278"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:04.082278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 30.7ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3157]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 1.6ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3156]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.9ms | ActiveRecord: 0.2ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:04.191396"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:04.191396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2517]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2517]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2517]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2517"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:04.195797"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:04.195797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:04.198996"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:04.198996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:04.651844"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:04.651844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3159]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3159) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.4ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.5ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:04 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2518", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3158]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 10.1ms | ActiveRecord: 1.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2518"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413210064-67310-2729/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:21:05.077594"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.077594"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:05.078724"], ["group_id", 2518], ["person_id", 3160], ["role", ""], ["updated_at", "2014-10-13 14:21:05.078724"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3160]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:05.080014' WHERE "people"."id" = 3160 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2518]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:05.081346' WHERE "groups"."id" = 2518  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2/image/edit Completed 302 Found in 15ms (ActiveRecord: 1.9ms) Started GET "/people/marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2/image/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.5ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started PUT "/people/marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2/image" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65181/people/marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2?cache_bust=1413210065 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2?cache_bust=1413210065" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413210065", "id"=>"marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3159]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-4282c44c-fa23-4e0e-987c-de5ab2853cb2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3160) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2517, 2518) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2517, 2518) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 1.8ms)  (0.4ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:05.292406"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:05.292406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3161]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3161) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:05.339004"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.339004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:05.341560"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:21:05.341560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3163) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.7ms | ActiveRecord: 1.0ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3163) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 3163) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3162]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 8.9ms | ActiveRecord: 1.8ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3163) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3163 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.423103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3161]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3163) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 1.0ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:05.448528"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:05.448528"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3164]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3164) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.1ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.0ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:05.540454"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.540454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3165) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.5ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3164]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3165) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.4ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:05.694838"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:05.694838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3166]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3166) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.4ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:05.790366"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.790366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 13ms (ActiveRecord: 1.3ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.5ms) Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3167) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.5ms | ActiveRecord: 1.0ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3166]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3167) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:05.874332"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:05.874332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3168]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3168]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3168]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3168) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.7ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:05.922774"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:05.922774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3168]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3169) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 9.1ms | ActiveRecord: 0.9ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3168]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3169) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.4ms | ActiveRecord: 1.0ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:05 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3168]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3169) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.0ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:06.033544"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:06.033544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3170]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3170) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.8ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0165' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:06.075920"], ["slug", "surname-0165"], ["surname", "Surname-0165"], ["updated_at", "2014-10-13 14:21:06.075920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0165/edit" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0165"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3171) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0165" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0165"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0165' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3171) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3171]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3170]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.2ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3171]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:06.153510"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:06.153510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3172]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3172]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3172]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3172) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3172]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 29.0ms | ActiveRecord: 0.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:06.310269"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:06.310269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2519]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2519]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2519]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2519"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:06.315336"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:06.315336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:06.771090"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:06.771090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3173]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3173) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.4ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.6ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:06 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2520", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:21:07.114356"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:07.114356"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:07.115327"], ["group_id", 2520], ["person_id", 3174], ["role", ""], ["updated_at", "2014-10-13 14:21:07.115327"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3174]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:07.116635' WHERE "people"."id" = 3174 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2520]] SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:07.118189' WHERE "groups"."id" = 2520  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/marco-polo/image/edit Completed 302 Found in 18ms (ActiveRecord: 2.3ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.5ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65181/people/marco-polo?cache_bust=1413210067 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413210067" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413210067", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3173]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3174) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2519, 2520) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2519, 2520) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:07.330655"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:07.330655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3175]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3175]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3175]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3175) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 36ms (Views: 31.3ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0166' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:07.375179"], ["slug", "surname-0166"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 14:21:07.375179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:07.381299"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:07.381299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2521]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2521]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2521]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2521"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:07.387023"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:07.387023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:07.388743"], ["group_id", 2522], ["person_id", 3176], ["updated_at", "2014-10-13 14:21:07.388743"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:07.389558' WHERE "people"."id" = 3176 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:07.390353' WHERE "groups"."id" = 2522  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0166/edit" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0166"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3175]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0166' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3176) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2521, 2522) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2521, 2522) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3176]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.6ms | ActiveRecord: 1.6ms) Started DELETE "/people/surname-0166" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0166"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3175]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0166' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3176) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 508]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3176]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:07.444635' WHERE "people"."id" = 3176 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:07.445320' WHERE "groups"."id" = 2522 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3176]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3175]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 508]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3176]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:07.464987"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:07.464987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3177]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3177]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3177]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3177) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 31.6ms | ActiveRecord: 1.4ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3177]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3177]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (18.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 23.9ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:07.596197"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:07.596197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3178]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3178]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3178]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3178) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 29.7ms | ActiveRecord: 1.1ms)  (0.3ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0167' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:07.640623"], ["slug", "surname-0167"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 14:21:07.640623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0167/edit" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0167"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3178]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0167' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3179) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.6ms | ActiveRecord: 0.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:07.695119"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:07.695119"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2523]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2523]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2523]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2523"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:07.699443"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:07.699443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0168' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:07.702594"], ["slug", "surname-0168"], ["surname", "Surname-0168"], ["updated_at", "2014-10-13 14:21:07.702594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65181/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:07 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:08.137682"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:08.137682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3181]] Redirected to http://127.0.0.1:65181/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3181) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (91.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 105ms (Views: 99.8ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0168/edit" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3180) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 40ms (Views: 33.0ms | ActiveRecord: 1.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0168" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0168", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2523", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3180) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0168' AND "people"."given_name" = '' AND ("people"."id" != 3180) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 3180 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:08.532494"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:08.533537"], ["group_id", 2523], ["person_id", 3180], ["role", ""], ["updated_at", "2014-10-13 14:21:08.533537"]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3180]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:08.535790' WHERE "people"."id" = 3180 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2523]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:08.537811' WHERE "groups"."id" = 2523  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65181/people/surname-0168 Completed 302 Found in 16ms (ActiveRecord: 3.3ms) Started GET "/people/surname-0168" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3180) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2523) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2523) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.6ms | ActiveRecord: 1.4ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0168/edit" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0168"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0168' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3180) ORDER BY groups.name Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2523) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2523) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3180]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3181]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:08.754041"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:08.754041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3182]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3182) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.8ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:08.806761"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:08.806761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3183) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3183) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.5ms | ActiveRecord: 1.0ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3183) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 3183) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 3183 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:08.883862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 12ms (ActiveRecord: 2.1ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3182]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3183) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:08.914033"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:08.914033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3184]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3184]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3184]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3184) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:08.960994"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-c1ecf3fd-233b-46f1-98cd-2227cc4a32b8"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 14:21:08.960994"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3185]] SQL (0.2ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3185 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:08.965258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:08.975289"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:08.975289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2525]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2525]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2525]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2525"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:08.979940"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:08.979940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:08.983577"], ["group_id", 2526], ["person_id", 3185], ["updated_at", "2014-10-13 14:21:08.983577"]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3185]] SQL (0.6ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:08.986439' WHERE "people"."id" = 3185 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:08.988042' WHERE "groups"."id" = 2526  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-c1ecf3fd-233b-46f1-98cd-2227cc4a32b8" for 127.0.0.1 at 2014-10-13 15:21:08 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-c1ecf3fd-233b-46f1-98cd-2227cc4a32b8"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3184]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c1ecf3fd-233b-46f1-98cd-2227cc4a32b8' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3185) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2525, 2526) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2525, 2526) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.016889"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.016889"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3186]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3186]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3186]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3186) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.064920"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-e287919b-3e00-414f-86ee-4a9f5f9a5272"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 14:21:09.064920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-e287919b-3e00-414f-86ee-4a9f5f9a5272" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e287919b-3e00-414f-86ee-4a9f5f9a5272"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3186]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e287919b-3e00-414f-86ee-4a9f5f9a5272' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3187) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 7.7ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.091047"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.091047"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3188]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3188]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3188]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3188) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.132391"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 14:21:09.132391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3189]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3189 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:09.136915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.150007"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.150007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2527]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2527]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2527]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2527"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:09.156659"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.156659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.159462"], ["group_id", 2528], ["person_id", 3189], ["updated_at", "2014-10-13 14:21:09.159462"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3189]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:09.161134' WHERE "people"."id" = 3189 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:09.161916' WHERE "groups"."id" = 2528  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3188]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3189) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2527, 2528) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2527, 2528) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 10.0ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.248560"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.248560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3190]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3190) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.1ms | ActiveRecord: 1.4ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.296594"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 14:21:09.296594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3191) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.1ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.0ms | ActiveRecord: 0.9ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 3191], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.336698"], ["updated_at", "2014-10-13 14:21:09.336698"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "1ccb498b-633e-44a9-a150-e35aba10b7cc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 4.8ms Sent mail to someone.else@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:21:09 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdfd5534c3_106ee3fdc61465be023675@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/1ccb498b-633e-44a9-a150-e35aba10b7cc?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3190]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3191) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.368934"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.368934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3192]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3192]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3192]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3192) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.413998"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 14:21:09.413998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 3193 [["email", nil], ["updated_at", "2014-10-13 14:21:09.415320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3192]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3193) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 7.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.7ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.439338"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 14:21:09.439338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3194]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.447064"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 14:21:09.447064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3195]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.453106"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 14:21:09.453106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3196]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.467895"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.467895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2529]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2529]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2529]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2529"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:09.474561"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.474561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2530]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2530]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2530]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2529/2530"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:09.479211"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.479211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (7.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.497919"], ["updated_at", "2014-10-13 14:21:09.497919"], ["user_email", "example.user.308@digital.justice.gov.uk"], ["value", "336e1beb-2b3b-4c53-b3d9-73b43d4b833b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 207]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.501204"], ["updated_at", "2014-10-13 14:21:09.501204"], ["user_email", "example.user.309@digital.justice.gov.uk"], ["value", "5917d73b-b71c-4fe7-96b8-fb4e4bbadfa9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.506346"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 14:21:09.506346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.507825"], ["updated_at", "2014-10-13 14:21:09.507825"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "ec1b8d27-ed32-48c2-b935-43ff56211b3b"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0178' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.511263"], ["slug", "surname-0178"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 14:21:09.511263"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0179' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.514474"], ["slug", "surname-0179"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 14:21:09.514474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0180' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.517422"], ["slug", "surname-0180"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 14:21:09.517422"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 3200 [["updated_at", "2014-10-13 14:21:09.519313"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.526859"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.526859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3201]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3201]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3201) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.2ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.570836"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.570836"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2532"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:09.577176"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.577176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2533]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2533]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2533]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2532/2533"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:09.582152"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.582152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2532]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2532"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:09.588937"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.588937"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2535]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2532/2535"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:09.594502"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:09.594502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0181' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.597054"], ["slug", "surname-0181"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 14:21:09.597054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.598453"], ["group_id", 2534], ["person_id", 3202], ["updated_at", "2014-10-13 14:21:09.598453"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:09.599021' WHERE "people"."id" = 3202 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:09.599606' WHERE "groups"."id" = 2534  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.600817"], ["group_id", 2536], ["person_id", 3202], ["updated_at", "2014-10-13 14:21:09.600817"]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:09.601738' WHERE "people"."id" = 3202 SQL (0.5ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:09.602855' WHERE "groups"."id" = 2536  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3201]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2536) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2532, 2535, 2536) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2536]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2532/2535/2536' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2532/2535/2536' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2536]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 2.1ms) Started GET "/people/surname-0181" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0181"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3201]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0181' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3202) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2536]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2532, 2533, 2534) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2532, 2535, 2536) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2532, 2533, 2534) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2532, 2535, 2536) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.658458"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.658458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3203]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3203]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3203]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3203) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0182' LIMIT 1 SQL (0.6ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:09.704066"], ["slug", "surname-0182"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 14:21:09.704066"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0182" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0182"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3203]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0182' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3204) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 7.4ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.728344"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:09.728344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3205]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3205]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3205]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3205) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.1ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0183' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:09.771002"], ["slug", "surname-0183"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 14:21:09.771002"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0183" for 127.0.0.1 at 2014-10-13 15:21:09 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0183"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3205]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0183' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3206) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.0ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:09.805198"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 14:21:09.805198"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0185' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:09.809067"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0185"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 14:21:09.809067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.9ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.456961"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0001"], ["updated_at", "2014-10-13 14:21:17.456961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0002' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.464486"], ["slug", "surname-0002"], ["surname", "Surname-0002"], ["updated_at", "2014-10-13 14:21:17.464486"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.478816"], ["event", "create"], ["item_id", 3210], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0002\n"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.496182"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.2@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.496182"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.499017"], ["event", "create"], ["item_id", 2537], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.2@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2537]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2537]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2537]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0001-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0001' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0001' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2537"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.505146"], ["name", "Group-0001"], ["slug", "group-0001"], ["team_email_address", "example.user.1@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.505146"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.507466"], ["event", "create"], ["item_id", 2538], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0001\nteam_email_address:\n- \n- example.user.1@digital.justice.gov.uk\nancestry:\n- \n- '2537'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.509389"], ["group_id", 2538], ["person_id", 3210], ["updated_at", "2014-10-13 14:21:17.509389"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.514304"], ["event", "create"], ["item_id", 514], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 3210\ngroup_id:\n- \n- 2538\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.515048' WHERE "people"."id" = 3210 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.515825' WHERE "groups"."id" = 2538  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 514]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.519040"], ["event", "destroy"], ["item_id", 514], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 514\ngroup_id: 2538\nperson_id: 3210\nrole: \ncreated_at: &1 2014-10-13 14:21:17.509389000 Z\nupdated_at: *1\nleader: false\n"]] PaperTrail::Version Load (0.4ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 514], ["item_type", "Peoplefinder::Membership"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.522047' WHERE "people"."id" = 3210 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.522746' WHERE "groups"."id" = 2538  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"284"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3209]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 284]] Redirected to http://test.host/audit_trail Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 514]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.538368"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0003"], ["updated_at", "2014-10-13 14:21:17.538368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.540832"], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:21:17.540832"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.542724"], ["event", "create"], ["item_id", 3212], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3212]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3212]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.550574"], ["event", "destroy"], ["item_id", 3212], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3212\ngiven_name: \nsurname: Necro\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:21:17.540832000 Z\nupdated_at: *1\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3212], ["item_type", "Peoplefinder::Person"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.4ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"286"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3211]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 286]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3212]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3212) AND "people"."slug" = 'necro' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.540832"], ["id", 3212], ["slug", "necro"], ["surname", "Necro"], ["updated_at", "2014-10-13 14:21:17.561282"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:17.563104"], ["event", "create"], ["item_id", 3212], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Necro\n"], ["whodunnit", "Surname-0003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Necro' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.569205"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0004"], ["updated_at", "2014-10-13 14:21:17.569205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.572253"], ["slug", "surname-0005"], ["surname", "Surname-0005"], ["updated_at", "2014-10-13 14:21:17.572253"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.574002"], ["event", "create"], ["item_id", 3214], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0005\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"288"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3213]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 288]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3214]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3214]] SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3214]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:17.582055"], ["event", "destroy"], ["item_id", 3214], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3214\ngiven_name: \nsurname: Surname-0005\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:21:17.572253000 Z\nupdated_at: 2014-10-13 14:21:17.572253000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "Surname-0004"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3214], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/audit_trail Completed 302 Found in 8ms (ActiveRecord: 1.8ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3214]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.589973"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0006"], ["updated_at", "2014-10-13 14:21:17.589973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.592675"], ["slug", "surname-0007"], ["surname", "Surname-0007"], ["updated_at", "2014-10-13 14:21:17.592675"]] SQL (0.1ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.594442"], ["event", "create"], ["item_id", 3216], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Surname-0007\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.600517"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.4@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.600517"]] SQL (0.4ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.602184"], ["event", "create"], ["item_id", 2539], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.4@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2539]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2539]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2539]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0002-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0002' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0002' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2539"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.607684"], ["name", "Group-0002"], ["slug", "group-0002"], ["team_email_address", "example.user.3@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.607684"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.611263"], ["event", "create"], ["item_id", 2540], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Group-0002\nteam_email_address:\n- \n- example.user.3@digital.justice.gov.uk\nancestry:\n- \n- '2539'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.612940"], ["group_id", 2540], ["person_id", 3216], ["updated_at", "2014-10-13 14:21:17.612940"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.614787"], ["event", "create"], ["item_id", 515], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nperson_id:\n- \n- 3216\ngroup_id:\n- \n- 2540\n"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.615560' WHERE "people"."id" = 3216 SQL (0.4ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.616356' WHERE "groups"."id" = 2540  (0.1ms) RELEASE SAVEPOINT active_record_1 PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."id" DESC LIMIT 1 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"293"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3215]] Peoplefinder::Version Load (0.6ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 293]] Redirected to http://test.host/audit_trail Completed 302 Found in 4ms (ActiveRecord: 0.8ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 515]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.630791"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.6@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.630791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2541]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2541]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2541]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2541"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.634936"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.5@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.634936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2541/2542"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.641683"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.7@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.641683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2541/2542/2543"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.646537"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.8@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.646537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2543]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2541/2542/2543"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.651385"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.9@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.651385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2541/2542"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.657584"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.10@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.657584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2542]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.667459"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.12@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.667459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2547]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2547]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2547]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2547"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.672064"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.11@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.672064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2547/2548"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.676944"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.13@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.676944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2547/2548/2549"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.681660"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.14@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.681660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2549]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.5ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2547/2548/2549"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.687502"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.15@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.687502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2548]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2547/2548"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.693932"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.16@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.693932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2548 OR "groups"."ancestry" ILIKE '2547/2548/%') OR "groups"."ancestry" = '2547/2548')) ORDER BY "groups"."name" ASC Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'A' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'B' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'C' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'D' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'E' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.708714"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.18@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.708714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2553]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2553]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2553"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.713340"], ["name", "A"], ["slug", "a"], ["team_email_address", "example.user.17@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.713340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'B-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'b' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'b' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2553/2554"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.718068"], ["name", "B"], ["slug", "b"], ["team_email_address", "example.user.19@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.718068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'C-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'c' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'c' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2553/2554/2555"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.722835"], ["name", "C"], ["slug", "c"], ["team_email_address", "example.user.20@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.722835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2555]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'D-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'd' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'd' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2553/2554/2555"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:17.728868"], ["name", "D"], ["slug", "d"], ["team_email_address", "example.user.21@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.728868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2554]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'E-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'e' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'e' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2553/2554"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:17.733947"], ["name", "E"], ["slug", "e"], ["team_email_address", "example.user.22@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.733947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2554 OR "groups"."ancestry" ILIKE '2553/2554/%') OR "groups"."ancestry" = '2553/2554')) ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:17.738699"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:21:17.738699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'aled.jones@digitial.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'aled-jones' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:17.749376"], ["email", "aled.jones@digitial.justice.gov.uk"], ["given_name", "aled"], ["slug", "aled-jones"], ["surname", "jones"], ["updated_at", "2014-10-13 14:21:17.749376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.753419"], ["email", "example.user@digital.justice.gov.uk"], ["slug", "example-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:21:17.753419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:17.759181"], ["email", "example.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "example-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:17.759181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.782938"], ["slug", "surname-0008"], ["surname", "Surname-0008"], ["updated_at", "2014-10-13 14:21:17.782938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.789789"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.24@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.789789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2559]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2559]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2559]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0003-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0003' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0003' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2559"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.794847"], ["name", "Group-0003"], ["slug", "group-0003"], ["team_email_address", "example.user.23@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.794847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.796262"], ["group_id", 2560], ["person_id", 3221], ["updated_at", "2014-10-13 14:21:17.796262"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.796915' WHERE "people"."id" = 3221 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.797553' WHERE "groups"."id" = 2560  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.806766"], ["slug", "surname-0009"], ["surname", "Surname-0009"], ["updated_at", "2014-10-13 14:21:17.806766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.813122"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.26@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.813122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2561]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2561]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2561]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0004-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0004' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0004' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2561"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.817802"], ["name", "Group-0004"], ["slug", "group-0004"], ["team_email_address", "example.user.25@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.817802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.819178"], ["group_id", 2562], ["person_id", 3222], ["updated_at", "2014-10-13 14:21:17.819178"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.819823' WHERE "people"."id" = 3222 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.820438' WHERE "groups"."id" = 2562  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" IS NULL AND "memberships"."group_id" IS NULL) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" IS NULL AND "memberships"."person_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.829535"], ["slug", "surname-0010"], ["surname", "Surname-0010"], ["updated_at", "2014-10-13 14:21:17.829535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:17.836451"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.28@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.836451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2563]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2563]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2563]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0005-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0005' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0005' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2563"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:17.841344"], ["name", "Group-0005"], ["slug", "group-0005"], ["team_email_address", "example.user.27@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:17.841344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:17.842579"], ["group_id", 2564], ["person_id", 3223], ["updated_at", "2014-10-13 14:21:17.842579"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:17.843193' WHERE "people"."id" = 3223 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:17.843768' WHERE "groups"."id" = 2564  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:17 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:17 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (29.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (54.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (1.2ms) Completed 200 OK in 128ms (Views: 128.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.037218"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.037218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3224]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3224]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3224]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3224) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (10.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (43.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 70ms (Views: 59.5ms | ActiveRecord: 1.2ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.8ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:18.148858"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.30@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.148858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2565]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2565]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2565]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0006-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0006' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0006' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2565"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:18.153872"], ["name", "Group-0006"], ["slug", "group-0006"], ["team_email_address", "example.user.29@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.153872"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0006" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0006"} Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.171074"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.171074"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/group-0006 Completed 302 Found in 5ms (ActiveRecord: 1.2ms) Started GET "/teams/group-0006" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0006"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3225]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0006' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2566) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2565, 2566) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2566]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (7.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2565/2566' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2565/2566' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2566]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 25.7ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.218873"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.218873"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3226]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3226]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3226]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3226) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.5ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:18.271601"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.32@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.271601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2567]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2567]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2567]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0007-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0007' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0007' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2567"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:18.276561"], ["name", "Group-0007"], ["slug", "group-0007"], ["team_email_address", "example.user.31@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.276561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2567]] Started GET "/teams/ministry-of-justice/edit" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3226]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2567) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2567) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2567' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (10.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2567' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 19.6ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.314838"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.314838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3227]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3227) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 30.0ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:18.362486"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.33@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.362486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2569]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2569]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2569]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2569"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:18.369511"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.34@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.369511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/corporate-services" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2570) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2569, 2570) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.4ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2569/2570' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2569/2570' ORDER BY "groups"."name" ASC SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2570]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 2.3ms) Started GET "/teams/corporate-services/groups/new" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"corporate-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'corporate-services' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.5ms | ActiveRecord: 0.6ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2570", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2570]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2570]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2570]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2570]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2569/2570"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:18.420183"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:21:18.420183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3227]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2571) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2569, 2570, 2571) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2571]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2569/2570/2571' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2569/2570/2571' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2571]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.3ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Digital Services' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2570]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.452048"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.452048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3228]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3228]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3228]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3228) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 128ms (Views: 122.3ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:18.591357"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.36@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.591357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0008-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0008' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0008' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2572"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:18.596008"], ["name", "Group-0008"], ["slug", "group-0008"], ["team_email_address", "example.user.35@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.596008"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0008/edit" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0008"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3228]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0008' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2573) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2572, 2573) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2572]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2572) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2572/2573' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 16.0ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:18.632158"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:18.632158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3229]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3229]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3229]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3229) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 37ms (Views: 31.2ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0011' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:18.678208"], ["slug", "surname-0011"], ["surname", "Surname-0011"], ["updated_at", "2014-10-13 14:21:18.678208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:18.684572"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.38@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.684572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0009-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0009' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0009' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2574"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:18.689512"], ["name", "Group-0009"], ["slug", "group-0009"], ["team_email_address", "example.user.37@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:18.689512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:18.690848"], ["group_id", 2575], ["person_id", 3230], ["updated_at", "2014-10-13 14:21:18.690848"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:18.691535' WHERE "people"."id" = 3230 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:18.692171' WHERE "groups"."id" = 2575  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0009/edit" for 127.0.0.1 at 2014-10-13 15:21:18 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0009"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3229]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0009' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2575) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2574, 2575) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2574]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2574) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2574/2575' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.9ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:19.791977"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.39@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:19.791977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2576]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2576]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2576]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2576"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:19.797856"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.40@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:19.797856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2576/2577"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:19.803046"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.41@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:19.803046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms) Started GET "/assets/moj-internal.css" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Started GET "/assets/application.css" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Started GET "/assets/Bliss2Rg.woff" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Started GET "/assets/moj_logo_horizontal_36x246.png" for 127.0.0.1 at 2014-10-13 15:21:19 +0100 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:20.579720"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:20.579720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3231]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3231) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 81ms (Views: 75.5ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/assets/medium_no_photo.png" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Started GET "/assets/icon_delete.png" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.8ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2578) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2576, 2577, 2578) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2578]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2576/2577/2578' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2576/2577/2578' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2578]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.0ms | ActiveRecord: 2.9ms) Started GET "/assets/icon_plus.png" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Started GET "/assets/icon_search.png" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2578) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2576, 2577, 2578) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2576, 2577) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (12.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2576/2577/2578' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 20.6ms | ActiveRecord: 2.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2577", "team_email_address"=>"example.user.41@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2578) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2578) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2578) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2578 [["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:21:20.978679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/teams/cyberdigital-cyberservices Completed 302 Found in 13ms (ActiveRecord: 2.6ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:21:20 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3231]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2578) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2576, 2577, 2578) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2578]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2576/2577/2578' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2576/2577/2578' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2578]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2578]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2577]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:21.070877"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.42@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:21.070877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:21.512623"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:21.512623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3232]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3232) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (20.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 28.8ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2579) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2579) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2579]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2579' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2579' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2579]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 2.5ms) Started GET "/teams/ministry-of-justice/groups/new" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#new as HTML Parameters: {"group_id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.6ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"CSG", "description"=>"", "responsibilities"=>"", "parent_id"=>"2579", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2579]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2579]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2579]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2579]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2579"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:21.788000"], ["description", ""], ["name", "CSG"], ["responsibilities", ""], ["slug", "csg"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:21:21.788000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/teams/csg Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/teams/csg" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"csg"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3232]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'csg' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2580) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2579, 2580) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2580]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2579/2580' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2579/2580' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2580]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'CSG' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2579]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:21.876138"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:21.876138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3233]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3233) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.2ms | ActiveRecord: 1.0ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.3ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:21.950070"], ["description", ""], ["name", "Digital"], ["responsibilities", ""], ["slug", "digital"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:21:21.950070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/digital Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Started GET "/teams/digital" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2581) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2581) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.0ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2581]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2581' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2581' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2581]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 9.9ms | ActiveRecord: 2.0ms) Started GET "/teams/digital/edit" for 127.0.0.1 at 2014-10-13 15:21:21 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3233]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2581) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2581) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms)  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2581' Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2581' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.4ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:22.013885"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.44@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:22.013885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2582]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2582]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Corporate Services-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'corporate-services' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'corporate-services' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2582"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:22.023368"], ["name", "Corporate Services"], ["slug", "corporate-services"], ["team_email_address", "example.user.43@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:22.023368"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:22.474889"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:22.474889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3234]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3234) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 34.8ms | ActiveRecord: 1.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.0ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Digital Services", "description"=>"", "responsibilities"=>"", "parent_id"=>"2583", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2583]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2583]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2583]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2583]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["ancestry", "2582/2583"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:22.725748"], ["description", ""], ["name", "Digital Services"], ["responsibilities", ""], ["slug", "digital-services"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:21:22.725748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/teams/digital-services Completed 302 Found in 9ms (ActiveRecord: 2.0ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3234]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2584) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2582, 2583, 2584) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2584]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2582/2583/2584' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2582/2583/2584' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2584]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:22.830038"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.45@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:22.830038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CSG-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'csg' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'csg' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2585"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:22.835153"], ["name", "CSG"], ["slug", "csg"], ["team_email_address", "example.user.46@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:22.835153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2585/2586"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:22.840523"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.47@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:22.840523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:22 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:23.290974"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:23.290974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3235]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3235) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (33.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 42.4ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2587) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2585, 2586, 2587) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2587]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2585/2586/2587' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2585/2586/2587' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2587]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (8.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (8.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.9ms | ActiveRecord: 2.2ms) Started GET "/teams/digital-services/edit" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"digital-services"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2587) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2585, 2586, 2587) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2586]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2585, 2586) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (14.3ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2585/2586/2587' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 22.7ms | ActiveRecord: 2.4ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started PATCH "/teams/digital-services" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Cyberdigital Cyberservices", "description"=>"", "responsibilities"=>"", "parent_id"=>"2585", "team_email_address"=>"example.user.47@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"digital-services"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'digital-services' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2587) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cyberdigital Cyberservices-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2587) AND "groups"."slug" = 'cyberdigital-cyberservices' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'cyberdigital-cyberservices' AND "groups"."id" != 2587) LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2585/2586/2587/%' OR "groups"."ancestry" = '2585/2586/2587')) SQL (0.3ms) UPDATE "groups" SET "ancestry" = $1, "ancestry_depth" = $2, "description" = $3, "name" = $4, "responsibilities" = $5, "slug" = $6, "updated_at" = $7 WHERE "groups"."id" = 2587 [["ancestry", "2585"], ["ancestry_depth", 1], ["description", ""], ["name", "Cyberdigital Cyberservices"], ["responsibilities", ""], ["slug", "cyberdigital-cyberservices"], ["updated_at", "2014-10-13 14:21:23.668266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/teams/cyberdigital-cyberservices Completed 302 Found in 15ms (ActiveRecord: 3.4ms) Started GET "/teams/cyberdigital-cyberservices" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"cyberdigital-cyberservices"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3235]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'cyberdigital-cyberservices' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2587) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2585, 2587) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2587]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.3ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2585/2587' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2585/2587' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2587]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.9ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2587]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2585]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:23.764963"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:23.764963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3236]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3236]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3236]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3236) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:23.819868"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.49@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:23.819868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0010-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0010' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0010' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2588"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:23.824501"], ["name", "Group-0010"], ["slug", "group-0010"], ["team_email_address", "example.user.48@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:23.824501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/group-0010/edit" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0010"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3236]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0010' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2589) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2588, 2589) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2588) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (8.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2588/2589' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.4ms | ActiveRecord: 2.2ms) Started DELETE "/teams/group-0010" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0010"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3236]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0010' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2589) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2588]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2588/2589/%' OR "groups"."ancestry" = '2588/2589')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2588/2589' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2589]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 9ms (ActiveRecord: 2.1ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3236]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2588) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2588) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2588' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2588' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2588]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.0ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2589]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:23.892847"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:23.892847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3237]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3237]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3237]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3237) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 39.4ms | ActiveRecord: 1.1ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3237]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Ministry of Justice", "description"=>"about my team", "responsibilities"=>"my responsibilities", "parent_id"=>"", "team_email_address"=>"something@example"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3237]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:23.973189"], ["description", "about my team"], ["name", "Ministry of Justice"], ["responsibilities", "my responsibilities"], ["slug", "ministry-of-justice"], ["team_email_address", "something@example"], ["updated_at", "2014-10-13 14:21:23.973189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:21:23 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3237]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2590) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2590) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2590]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (4.5ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2590' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2590' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2590]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.5ms | ActiveRecord: 2.1ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:24 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:24 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:24.008493"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:24.008493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3238]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3238]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:24 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3238]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3238) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.6ms | ActiveRecord: 0.9ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:24 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3238]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0012' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:24.371056"], ["image", "placeholder.png"], ["slug", "surname-0012"], ["surname", "Surname-0012"], ["updated_at", "2014-10-13 14:21:24.371056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0013' LIMIT 1 SQL (0.7ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:25.139218"], ["image", "placeholder.png"], ["slug", "surname-0013"], ["surname", "Surname-0013"], ["updated_at", "2014-10-13 14:21:25.139218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:25.248188"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.51@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:25.248188"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2591]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2591]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2591]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2591"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:25.256862"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.50@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:25.256862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:25.261635"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:25.261635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 7.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:25.723664"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:25.723664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3242]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 11ms (ActiveRecord: 2.0ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3242) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.0ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 38.2ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:25 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2592", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3241]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.6ms) Completed 200 OK in 36ms (Views: 23.2ms | ActiveRecord: 1.1ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2592"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>"1413210086-67437-9382/placeholder.png"}, "commit"=>"Continue"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Exists (0.6ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:21:26.191193"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:26.191193"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:26.192754"], ["group_id", 2592], ["person_id", 3243], ["role", ""], ["updated_at", "2014-10-13 14:21:26.192754"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3243]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:26.194935' WHERE "people"."id" = 3243 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2592]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:26.197119' WHERE "groups"."id" = 2592  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30/image/edit Completed 302 Found in 22ms (ActiveRecord: 2.6ms) Started GET "/people/marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30/image/edit" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 11.9ms | ActiveRecord: 0.6ms) Started GET "/assets/Jcrop/css/jquery.Jcrop.min.css" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Started GET "/assets/Jcrop/css/Jcrop.gif" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Started PUT "/people/marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30/image" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65224/people/marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30?cache_bust=1413210086 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30?cache_bust=1413210086" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413210086", "id"=>"marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3242]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo-c8490519-5e38-42b0-9f8a-02d23caa2d30' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3243) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2591, 2592) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (2.5ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2591, 2592) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 26ms (Views: 19.7ms | ActiveRecord: 1.5ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:26.435121"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.53@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:26.435121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2593]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2593]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2593]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2593"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:26.439641"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.52@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:26.439641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:26.442174"], ["slug", "surname-0014"], ["surname", "Surname-0014"], ["updated_at", "2014-10-13 14:21:26.442174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:26.912620"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:26.912620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3245]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:26 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3245) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 37.9ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0014/edit" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0014"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0014' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3244) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0014" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0014", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2593", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"1", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0014"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0014' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3244) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0014' AND "people"."given_name" = '' AND ("people"."id" != 3244) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "no_phone" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 3244 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["no_phone", "t"], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:27.235566"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:27.236861"], ["group_id", 2593], ["person_id", 3244], ["role", ""], ["updated_at", "2014-10-13 14:21:27.236861"]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3244]] SQL (0.7ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:27.239868' WHERE "people"."id" = 3244 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2593]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:27.243469' WHERE "groups"."id" = 2593  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/surname-0014 Completed 302 Found in 21ms (ActiveRecord: 4.0ms) Started GET "/people/surname-0014" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0014"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0014' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.2ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3244) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.5ms | ActiveRecord: 2.1ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/surname-0014/edit" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0014"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0014' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3244) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2593) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3244]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 37.4ms | ActiveRecord: 2.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3245]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:27.501492"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:27.501492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3246]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3246) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 39.9ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.9ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:27.566872"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.55@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:27.566872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2595]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2595]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2595]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0011-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0011' LIMIT 1 Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0011' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2595"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:27.572490"], ["name", "Group-0011"], ["slug", "group-0011"], ["team_email_address", "example.user.54@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:27.572490"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:27.577984"], ["slug", "surname-0015"], ["surname", "Surname-0015"], ["updated_at", "2014-10-13 14:21:27.577984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:27.581411"], ["group_id", 2596], ["person_id", 3247], ["updated_at", "2014-10-13 14:21:27.581411"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3247]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:27.583257' WHERE "people"."id" = 3247 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:27.584040' WHERE "groups"."id" = 2596  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0015" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0015"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0015' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3247) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2595, 2596) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2595, 2596) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 13.8ms | ActiveRecord: 2.2ms) Started GET "/people/surname-0015/reported_profiles/new" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"surname-0015"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0015' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 21.3ms | ActiveRecord: 2.1ms) Started POST "/people/surname-0015/reported_profiles" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"utf8"=>"✓", "reported_profile"=>{"reason_for_reporting"=>"Duplicate profile", "additional_details"=>"Some stuff"}, "commit"=>"Submit", "person_id"=>"surname-0015"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0015' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3247]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "Some stuff"], ["notifier_id", 3246], ["reason_for_reporting", "Duplicate profile"], ["recipient_email", "example.user.54@digital.justice.gov.uk"], ["subject_id", 3247]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 8.0ms Sent mail to example.user.54@digital.justice.gov.uk (6.3ms) Date: Mon, 13 Oct 2014 15:21:27 +0100 From: support@example.com To: example.user.54@digital.justice.gov.uk Message-ID: <543bdfe7a5555_1076d3ffd35465bf0872c4@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit John Doe has said that they believe the information on Surname-0015 to be incorrect. Reason for reporting: Duplicate profile Additional details: Some stuff Please fix or delete this page: http://www.example.com/people/surname-0015 Redirected to http://www.example.com/people/surname-0015 Completed 302 Found in 27ms (ActiveRecord: 1.6ms) Started GET "/people/surname-0015" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0015"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3246]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0015' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3247) ORDER BY groups.name Peoplefinder::Group Load (1.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2595, 2596) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2595, 2596) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:27.713805"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:27.713805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3248]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3248]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3248]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3248) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 45ms (Views: 37.5ms | ActiveRecord: 2.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3248]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (49.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 60ms (Views: 57.3ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:27.836923"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:27.836923"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3249]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3249]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 12ms (ActiveRecord: 2.1ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3249]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3249) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 54ms (Views: 42.5ms | ActiveRecord: 2.5ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3249]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.7ms | ActiveRecord: 0.5ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:27 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3249]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 36.4ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.007604"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.007604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3250]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3250]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3250]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3250) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (29.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 40.6ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:28.068091"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:28.068091"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3250]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3251) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3250]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3251) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 0.9ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3250]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3251) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (19.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 27.5ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.186316"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.186316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3252]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3252) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.8ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:28.239111"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:28.239111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3253) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 1.2ms) Started GET "/people/marco-polo/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3253) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.1ms) Started PATCH "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jane", "surname"=>"Doe", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3253) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Doe' AND "people"."given_name" = 'Jane' AND ("people"."id" != 3253) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "given_name" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 3253 [["given_name", "Jane"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.323404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/marco-polo Completed 302 Found in 14ms (ActiveRecord: 1.9ms) Started GET "/people/marco-polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"marco-polo"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3252]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3253) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.355605"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.355605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3254]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3254) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.4ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:28.408492"], ["slug", "surname-0016"], ["surname", "Surname-0016"], ["updated_at", "2014-10-13 14:21:28.408492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0016/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0016"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0016' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3255) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 48ms (Views: 43.0ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0016" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0016"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0016' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3255) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3255]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3254]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.2ms | ActiveRecord: 0.2ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3255]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.497975"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.497975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3256]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3256) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:28.544450"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:28.544450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 29.9ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3257]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3256]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.3ms | ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.641808"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.641808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3258]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3258) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 34.6ms | ActiveRecord: 0.4ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:28.750785"], ["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:28.750785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo/image/edit Completed 302 Found in 13ms (ActiveRecord: 1.3ms) Started GET "/people/polo/image/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3259) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 1.4ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3258]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3259) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.0ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.842996"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.842996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3260]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3260]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3260]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3260) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:28.891728"], ["slug", "surname-0017"], ["surname", "Surname-0017"], ["updated_at", "2014-10-13 14:21:28.891728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0017/edit" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0017"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3260]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0017' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3261) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:28.948508"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:28.948508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3262]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3262]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:28 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3262]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3262) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0018' LIMIT 1 SQL (0.5ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:28.997488"], ["slug", "surname-0018"], ["surname", "Surname-0018"], ["updated_at", "2014-10-13 14:21:28.997488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:29.005099"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.57@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:29.005099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2597]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2597]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2597]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0012-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0012' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0012' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2597"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:29.009955"], ["name", "Group-0012"], ["slug", "group-0012"], ["team_email_address", "example.user.56@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:29.009955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:29.011366"], ["group_id", 2598], ["person_id", 3263], ["updated_at", "2014-10-13 14:21:29.011366"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:29.012086' WHERE "people"."id" = 3263 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:29.012829' WHERE "groups"."id" = 2598  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0018/edit" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0018"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3262]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0018' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3263) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2597, 2598) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2597, 2598) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3263]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.3ms | ActiveRecord: 1.7ms) Started DELETE "/people/surname-0018" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0018"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3262]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0018' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3263) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 523]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3263]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:29.069349' WHERE "people"."id" = 3263 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:29.070234' WHERE "groups"."id" = 2598 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3263]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3262]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 29ms (Views: 27.0ms | ActiveRecord: 0.4ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 523]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3263]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:29.113665"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:29.113665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3264]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3264) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 40ms (Views: 34.6ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:29.162896"], ["given_name", "Marco"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:29.162896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.4ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:29.165573"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:21:29.165573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bobbie-browne/edit" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3266) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 46ms (Views: 39.6ms | ActiveRecord: 1.2ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3266) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" != 3266) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3265]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 1.6ms) Started PATCH "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image_cache"=>""}, "commit"=>"Continue", "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3266) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3266 [["description", ""], ["email", ""], ["given_name", "Marco"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:29.261036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bobbie-browne Completed 302 Found in 10ms (ActiveRecord: 1.6ms) Started GET "/people/bobbie-browne" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bobbie-browne"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3264]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3266) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" WHERE "people"."surname" = 'Polo'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:29.292070"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.59@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:29.292070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2599]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2599]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2599"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:29.297610"], ["name", "Digital"], ["slug", "digital"], ["team_email_address", "example.user.58@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:29.297610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:29.740814"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:29.740814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3267]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3267) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 44ms (Views: 39.0ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 38.3ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:29 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Marco", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2600", "leader"=>"0"}}, "location"=>"MOJ / Petty France / London", "primary_phone_number"=>"+44-208-123-4567", "secondary_phone_number"=>"07777777777", "no_phone"=>"0", "email"=>"marco.polo@example.com", "description"=>"Lorem ipsum dolor sit amet...", "works_monday"=>"0", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"0", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'marco-polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = 'Marco' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at", "works_friday", "works_monday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" [["created_at", "2014-10-13 14:21:30.099665"], ["description", "Lorem ipsum dolor sit amet..."], ["email", "marco.polo@example.com"], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["slug", "marco-polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:30.099665"], ["works_friday", "f"], ["works_monday", "f"]] SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.100788"], ["group_id", 2600], ["person_id", 3268], ["role", ""], ["updated_at", "2014-10-13 14:21:30.100788"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3268]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:30.102164' WHERE "people"."id" = 3268 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2600]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:30.103632' WHERE "groups"."id" = 2600  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/marco-polo/image/edit Completed 302 Found in 18ms (ActiveRecord: 2.2ms) Started GET "/people/marco-polo/image/edit" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 7.5ms | ActiveRecord: 0.7ms) Started PUT "/people/marco-polo/image" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"crop_x"=>"20", "crop_y"=>"20", "crop_w"=>"151", "crop_h"=>"151"}, "commit"=>"Update Image", "person_id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://127.0.0.1:65224/people/marco-polo?cache_bust=1413210090 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) Started GET "/people/marco-polo?cache_bust=1413210090" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"cache_bust"=>"1413210090", "id"=>"marco-polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3267]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'marco-polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3268) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2599, 2600) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2599, 2600) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 12.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.311506"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.311506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3269]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3269) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.5ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 32.3ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Polo", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'polo' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Polo' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:30.415539"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "polo"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:30.415539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/polo Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/polo" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3270) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms) Started GET "/people/polo/edit" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"polo"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3269]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'polo' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3270) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 35.5ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.495522"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.495522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3271]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3271]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3271]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3271) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (47.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 65ms (Views: 57.6ms | ActiveRecord: 1.6ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.567960"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0019"], ["updated_at", "2014-10-13 14:21:30.567960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET "email" = $1, "updated_at" = $2 WHERE "people"."id" = 3272 [["email", nil], ["updated_at", "2014-10-13 14:21:30.569598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3271]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3272) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.599618"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.599618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3273]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3273]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3273]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3273) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.647532"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0020"], ["updated_at", "2014-10-13 14:21:30.647532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3274]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3274 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:30.653668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.664019"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.61@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:30.664019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2601]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2601]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2601]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0013-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0013' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0013' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2601"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:30.668847"], ["name", "Group-0013"], ["slug", "group-0013"], ["team_email_address", "example.user.60@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:30.668847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:30.672301"], ["group_id", 2602], ["person_id", 3274], ["updated_at", "2014-10-13 14:21:30.672301"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3274]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:30.674563' WHERE "people"."id" = 3274 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:30.675410' WHERE "groups"."id" = 2602  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3273]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3274) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2601, 2602) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2601, 2602) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.704730"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.704730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3275]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3275) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.750780"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0021"], ["updated_at", "2014-10-13 14:21:30.750780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3276) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 1.7ms) Started GET "/people/someone-else/information_requests/new" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"someone-else"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 10.0ms | ActiveRecord: 0.7ms) Started POST "/people/someone-else/information_requests" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"utf8"=>"✓", "information_request"=>{"message"=>"Hello Bob"}, "commit"=>"Submit", "person_id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Hello Bob"], ["recipient_id", 3276], ["sender_email", "test.user@digital.justice.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:30.803298"], ["updated_at", "2014-10-13 14:21:30.803298"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "925aae53-8854-409f-a4a3-21fdf6692a27"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 7.0ms Sent mail to someone.else@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:30 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdfeac5e28_1076d3ffd35465bf0873c3@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Bob Log in to the People Finder: http://www.example.com/tokens/925aae53-8854-409f-a4a3-21fdf6692a27?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://www.example.com/people/someone-else Completed 302 Found in 14ms (ActiveRecord: 1.6ms) Started GET "/people/someone-else" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"someone-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3275]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'someone-else' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3276) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.840007"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.840007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3277]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3277]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3277]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3277) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (31.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 46ms (Views: 41.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.894549"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-fd6258fa-0bf9-4c0e-8177-0cbaea140895"], ["surname", "Surname-0022"], ["updated_at", "2014-10-13 14:21:30.894549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-fd6258fa-0bf9-4c0e-8177-0cbaea140895" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-fd6258fa-0bf9-4c0e-8177-0cbaea140895"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3277]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-fd6258fa-0bf9-4c0e-8177-0cbaea140895' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3278) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:30.920119"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:30.920119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3279]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3279]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3279]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3279) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.967621"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-7218f6f9-953a-4264-af08-75d9930c6849"], ["surname", "Surname-0023"], ["updated_at", "2014-10-13 14:21:30.967621"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3280]] SQL (0.4ms) UPDATE "people" SET "description" = $1, "given_name" = $2, "image" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3280 [["description", "Lorem ipsum dolor sit amet..."], ["given_name", "Marco"], ["image", "placeholder.png"], ["location", "MOJ / Petty France / London"], ["primary_phone_number", "+44-208-123-4567"], ["secondary_phone_number", "07777777777"], ["surname", "Polo"], ["updated_at", "2014-10-13 14:21:30.972997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:30.984290"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.63@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:30.984290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2603]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2603]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2603]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0014-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0014' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0014' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2603"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:30.989430"], ["name", "Group-0014"], ["slug", "group-0014"], ["team_email_address", "example.user.62@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:30.989430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:30.991462"], ["group_id", 2604], ["person_id", 3280], ["updated_at", "2014-10-13 14:21:30.991462"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3280]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:30.993020' WHERE "people"."id" = 3280 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:30.993729' WHERE "groups"."id" = 2604  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-7218f6f9-953a-4264-af08-75d9930c6849" for 127.0.0.1 at 2014-10-13 15:21:30 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-7218f6f9-953a-4264-af08-75d9930c6849"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3279]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-7218f6f9-953a-4264-af08-75d9930c6849' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3280) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2603, 2604) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2603, 2604) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.022368"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0024"], ["updated_at", "2014-10-13 14:21:31.022368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#unprocessable as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3281]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.031527"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0025"], ["updated_at", "2014-10-13 14:21:31.031527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#file_not_found as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3282]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.038816"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0026"], ["updated_at", "2014-10-13 14:21:31.038816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ErrorsController#internal_server_error as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3283]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:31.049943"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:31.049943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3284]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3284]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3284]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3284) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.098748"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.64@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.098748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Apple' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Apple-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'apple' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'apple' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2605"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.104805"], ["name", "Apple"], ["slug", "apple"], ["team_email_address", "example.user.65@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.104805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Biwa' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2606]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2606]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2606]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Biwa-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'biwa' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'biwa' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2605/2606"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.110396"], ["name", "Biwa"], ["slug", "biwa"], ["team_email_address", "example.user.66@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.110396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Ministry of Justice' ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Cherry' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2605]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Cherry-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cherry' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cherry' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2605"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.117145"], ["name", "Cherry"], ["slug", "cherry"], ["team_email_address", "example.user.67@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.117145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."name" = 'Durian' ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2608]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2608]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2608]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Durian-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'durian' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'durian' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2605/2608"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.123205"], ["name", "Durian"], ["slug", "durian"], ["team_email_address", "example.user.68@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.123205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.125936"], ["slug", "surname-0027"], ["surname", "Surname-0027"], ["updated_at", "2014-10-13 14:21:31.125936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.127515"], ["group_id", 2607], ["person_id", 3285], ["updated_at", "2014-10-13 14:21:31.127515"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.128193' WHERE "people"."id" = 3285 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.128882' WHERE "groups"."id" = 2607  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.130329"], ["group_id", 2609], ["person_id", 3285], ["updated_at", "2014-10-13 14:21:31.130329"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.130944' WHERE "people"."id" = 3285 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.131552' WHERE "groups"."id" = 2609  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/durian" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"durian"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3284]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'durian' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2609) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2605, 2608, 2609) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2609]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2605/2608/2609' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2605/2608/2609' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2609]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 2.0ms) Started GET "/people/surname-0027" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0027"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3284]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0027' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3285) ORDER BY groups.name Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2609]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2605, 2606, 2607) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2605, 2608, 2609) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2605, 2606, 2607) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2605, 2608, 2609) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (14.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 27.8ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:31.203814"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:31.203814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3286]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3286]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3286]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3286) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday", "works_sunday") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:31.249402"], ["slug", "surname-0028"], ["surname", "Surname-0028"], ["updated_at", "2014-10-13 14:21:31.249402"], ["works_saturday", "t"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0028" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0028"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3286]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0028' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3287) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:31.274430"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:31.274430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3288]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3288]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3288]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3288) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.322391"], ["slug", "surname-0029"], ["surname", "Surname-0029"], ["updated_at", "2014-10-13 14:21:31.322391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0029" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0029"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3288]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0029' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3289) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:31.346440"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:31.346440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3290]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3290]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3290) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 39ms (Views: 33.6ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3290) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 41ms (Views: 35.8ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3290]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3290) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3290]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3290]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::GroupsController#new as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0015' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0015' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.465833"], ["name", "Group-0015"], ["slug", "group-0015"], ["team_email_address", "example.user.69@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.465833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2610]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2610]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2610]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0016-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0016' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0016' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2610"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.471335"], ["name", "Group-0016"], ["slug", "group-0016"], ["team_email_address", "example.user.70@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.471335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2611]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2611]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2611]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0017-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0017' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0017' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2610/2611"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.476394"], ["name", "Group-0017"], ["slug", "group-0017"], ["team_email_address", "example.user.71@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.476394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2612]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2612]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2612]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0018-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0018' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0018' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2610/2611/2612"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:31.481306"], ["name", "Group-0018"], ["slug", "group-0018"], ["team_email_address", "example.user.72@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.481306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2610, 2611, 2612, 2613) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.489644"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.74@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.489644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2614]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2614]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2614]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0019-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0019' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0019' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2614"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.494117"], ["name", "Group-0019"], ["slug", "group-0019"], ["team_email_address", "example.user.73@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.494117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2615]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2615]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2615]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0020-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0020' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0020' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2614/2615"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.499635"], ["name", "Group-0020"], ["slug", "group-0020"], ["team_email_address", "example.user.75@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.499635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2616]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2616]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2616]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0021-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0021' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0021' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2614/2615/2616"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:31.505924"], ["name", "Group-0021"], ["slug", "group-0021"], ["team_email_address", "example.user.76@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.505924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0019' AND "groups"."id" != 2615) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0022' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0022' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.511942"], ["name", "Group-0022"], ["slug", "group-0022"], ["team_email_address", "example.user.77@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.511942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2618) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" IS NULL LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.527485"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.78@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.527485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2619]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2619]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0023-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0023' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0023' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2619"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.535951"], ["name", "Group-0023"], ["slug", "group-0023"], ["team_email_address", "example.user.79@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.535951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.544639"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.80@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.544639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'cs' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'cs' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2621"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.549322"], ["name", "CS"], ["slug", "cs"], ["team_email_address", "example.user.81@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.549322"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2621]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'CS-%')  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.558519"], ["name", "MOJ"], ["slug", "moj"], ["team_email_address", "example.user.82@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.558519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.565853"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.84@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.565853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2624]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2624]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0024-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0024' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0024' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2624"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.571046"], ["name", "Group-0024"], ["slug", "group-0024"], ["team_email_address", "example.user.83@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.571046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2624/2625' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2625]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.582337"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.86@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.582337"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2626]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2626]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0025-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0025' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0025' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2626"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.586954"], ["name", "Group-0025"], ["slug", "group-0025"], ["team_email_address", "example.user.85@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.586954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.590726"], ["slug", "surname-0030"], ["surname", "Surname-0030"], ["updated_at", "2014-10-13 14:21:31.590726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.592502"], ["group_id", 2627], ["person_id", 3291], ["updated_at", "2014-10-13 14:21:31.592502"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.593166' WHERE "people"."id" = 3291 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2627]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.594674' WHERE "groups"."id" = 2627  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2626/2627' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2627]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.606066"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.88@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.606066"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2628]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2628]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0026-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0026' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0026' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2628"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.611862"], ["name", "Group-0026"], ["slug", "group-0026"], ["team_email_address", "example.user.87@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.611862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.614945"], ["slug", "surname-0031"], ["surname", "Surname-0031"], ["updated_at", "2014-10-13 14:21:31.614945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.616480"], ["group_id", 2629], ["person_id", 3292], ["updated_at", "2014-10-13 14:21:31.616480"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.617079' WHERE "people"."id" = 3292 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2629]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.618396' WHERE "groups"."id" = 2629  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2628/2629' ORDER BY "groups"."name" ASC SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 ORDER BY people.surname [["group_id", 2629]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.628739"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.90@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.628739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2630]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2630]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2630]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0027-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0027' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0027' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2630"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.633546"], ["name", "Group-0027"], ["slug", "group-0027"], ["team_email_address", "example.user.89@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.633546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2631]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2631]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2631]]  (0.7ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0028-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0028' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0028' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2630/2631"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.640221"], ["name", "Group-0028"], ["slug", "group-0028"], ["team_email_address", "example.user.91@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.640221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2631]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2630/2631' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.650673"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.93@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.650673"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2633]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2633]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2633]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0029-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0029' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0029' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2633"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.655483"], ["name", "Group-0029"], ["slug", "group-0029"], ["team_email_address", "example.user.92@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.655483"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.660524"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:31.660524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.662974"], ["group_id", 2634], ["person_id", 3293], ["updated_at", "2014-10-13 14:21:31.662974"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.663625' WHERE "people"."id" = 3293 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2634]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.665025' WHERE "groups"."id" = 2634  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2634 OR "groups"."ancestry" ILIKE '2633/2634/%') OR "groups"."ancestry" = '2633/2634')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (1.2ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2634) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.676116"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.95@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.676116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2635]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2635]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2635]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0030-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0030' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0030' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2635"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.681572"], ["name", "Group-0030"], ["slug", "group-0030"], ["team_email_address", "example.user.94@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.681572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.684950"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:31.684950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.686820"], ["group_id", 2636], ["person_id", 3294], ["updated_at", "2014-10-13 14:21:31.686820"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.687572' WHERE "people"."id" = 3294 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2636]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.688888' WHERE "groups"."id" = 2636  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2636]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2636]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2636]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0031-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0031' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0031' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2635/2636"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.693688"], ["name", "Group-0031"], ["slug", "group-0031"], ["team_email_address", "example.user.96@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.693688"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.696614"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:21:31.696614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.698538"], ["group_id", 2637], ["person_id", 3295], ["updated_at", "2014-10-13 14:21:31.698538"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.699237' WHERE "people"."id" = 3295 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2637]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.700522' WHERE "groups"."id" = 2637  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2636 OR "groups"."ancestry" ILIKE '2635/2636/%') OR "groups"."ancestry" = '2635/2636')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2636,2637) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.710377"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.98@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.710377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2638]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2638]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2638]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0032-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0032' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2638"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.716054"], ["name", "Group-0032"], ["slug", "group-0032"], ["team_email_address", "example.user.97@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.716054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.719804"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:31.719804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.722390"], ["group_id", 2639], ["person_id", 3296], ["updated_at", "2014-10-13 14:21:31.722390"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.723092' WHERE "people"."id" = 3296 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2639]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.724448' WHERE "groups"."id" = 2639  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2639]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2639]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2639]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0033-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0033' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2638/2639"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.729503"], ["name", "Group-0033"], ["slug", "group-0033"], ["team_email_address", "example.user.99@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.729503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.732970"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:21:31.732970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.734988"], ["group_id", 2640], ["person_id", 3297], ["updated_at", "2014-10-13 14:21:31.734988"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.735670' WHERE "people"."id" = 3297 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2640]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.736978' WHERE "groups"."id" = 2640  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.739230"], ["group_id", 2640], ["person_id", 3297], ["updated_at", "2014-10-13 14:21:31.739230"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.740027' WHERE "people"."id" = 3297 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2640]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.741480' WHERE "groups"."id" = 2640  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2639 OR "groups"."ancestry" ILIKE '2638/2639/%') OR "groups"."ancestry" = '2638/2639')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2639,2640) group by p.id;  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.751716"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.101@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.751716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2641]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2641]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2641]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0034-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0034' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2641"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.756400"], ["name", "Group-0034"], ["slug", "group-0034"], ["team_email_address", "example.user.100@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.756400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.759797"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:31.759797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.761829"], ["group_id", 2642], ["person_id", 3298], ["updated_at", "2014-10-13 14:21:31.761829"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.762516' WHERE "people"."id" = 3298 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2642]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.763813' WHERE "groups"."id" = 2642  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2642]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2642]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0035-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0035' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2641/2642"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:31.770085"], ["name", "Group-0035"], ["slug", "group-0035"], ["team_email_address", "example.user.102@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.770085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.773676"], ["slug", "alice"], ["surname", "alice"], ["updated_at", "2014-10-13 14:21:31.773676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.775714"], ["group_id", 2643], ["person_id", 3299], ["updated_at", "2014-10-13 14:21:31.775714"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.776328' WHERE "people"."id" = 3299 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2643]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.777635' WHERE "groups"."id" = 2643  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.779309"], ["group_id", 2643], ["person_id", 3299], ["updated_at", "2014-10-13 14:21:31.779309"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.780068' WHERE "people"."id" = 3299 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2643]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.781397' WHERE "groups"."id" = 2643  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2642 OR "groups"."ancestry" ILIKE '2641/2642/%') OR "groups"."ancestry" = '2641/2642')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.7ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2642,2643) group by p.id;  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.793391"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.104@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.793391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2644"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.798323"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.103@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.798323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2644) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2644 [["team_email_address", "example.user.106@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.801485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2644]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2644"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.806846"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.105@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.806846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.814149"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.108@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.814149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2647"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.819191"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.107@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.819191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2647) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2647 [["team_email_address", "example.user.110@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.822485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2647"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.827797"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services"], ["team_email_address", "example.user.109@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.827797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2647) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2647 [["team_email_address", "example.user.112@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.830667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2647]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice-digital-services-2' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2647"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.836358"], ["name", "Digital Services"], ["slug", "ministry-of-justice-digital-services-2"], ["team_email_address", "example.user.111@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.836358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.844460"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.114@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.844460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2651]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2651]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2651]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2651"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.848952"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.113@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.848952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.857324"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.116@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.857324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2653"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.862076"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.115@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.862076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2653]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Analog Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2654) AND "groups"."slug" = 'analog-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'analog-services' AND "groups"."id" != 2654) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "updated_at" = $3 WHERE "groups"."id" = 2654 [["name", "Analog Services"], ["slug", "analog-services"], ["updated_at", "2014-10-13 14:21:31.867034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2654]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.875372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.118@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.875372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2655]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2655]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2655]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0036-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0036' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0036' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2655"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.879988"], ["name", "Group-0036"], ["slug", "group-0036"], ["team_email_address", "example.user.117@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.879988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0032' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:31.882894"], ["slug", "surname-0032"], ["surname", "Surname-0032"], ["updated_at", "2014-10-13 14:21:31.882894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.884205"], ["group_id", 2656], ["leader", "t"], ["person_id", 3300], ["updated_at", "2014-10-13 14:21:31.884205"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:31.884992' WHERE "people"."id" = 3300 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:31.885659' WHERE "groups"."id" = 2656  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' ORDER BY "memberships"."id" ASC LIMIT 1 [["group_id", 2656]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.894734"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.119@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.894734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2657'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.901819"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.120@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.901819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.908652"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.121@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.908652"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2659]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2659]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2659]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0037-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0037' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0037' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2659"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.913629"], ["name", "Group-0037"], ["slug", "group-0037"], ["team_email_address", "example.user.122@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.913629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2659]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE "groups"."ancestry" = '2659'  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.923601"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.124@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.923601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2661]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2661]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2661]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0038-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0038' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0038' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2661"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.942534"], ["name", "Group-0038"], ["slug", "group-0038"], ["team_email_address", "example.user.123@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.942534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2661/2662' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.950944"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.126@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.950944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2663]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2663]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2663]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0039-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0039' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0039' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2663"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.956116"], ["name", "Group-0039"], ["slug", "group-0039"], ["team_email_address", "example.user.125@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.956116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2663/2664' ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.964631"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.128@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.964631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2665]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2665]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2665]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0040-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0040' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0040' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2665"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.969129"], ["name", "Group-0040"], ["slug", "group-0040"], ["team_email_address", "example.user.127@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.969129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2665/2666/%' OR "groups"."ancestry" = '2665/2666')) SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2666]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2666]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:31.985546"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.130@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.985546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2667]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2667]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2667]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0041-%') Peoplefinder::Group Exists (0.5ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0041' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2667"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:31.991319"], ["name", "Group-0041"], ["slug", "group-0041"], ["team_email_address", "example.user.129@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:31.991319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2667/2668/%' OR "groups"."ancestry" = '2667/2668'))  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:31 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:32.000350"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:32.000350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3301]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3301]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3301]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3301) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:32.050083"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.131@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.050083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2669]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2669]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2669]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2669"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:32.056210"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.132@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.056210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0033' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:32.058926"], ["slug", "surname-0033"], ["surname", "Surname-0033"], ["updated_at", "2014-10-13 14:21:32.058926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:32.061001"], ["group_id", 2670], ["person_id", 3302], ["updated_at", "2014-10-13 14:21:32.061001"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3302]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:32.062937' WHERE "people"."id" = 3302 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:32.063753' WHERE "groups"."id" = 2670  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0033/edit" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0033"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3301]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0033' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3302) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2669, 2670) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2669, 2670) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3302]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.1ms | ActiveRecord: 1.6ms) Started DELETE "/memberships/541?referer=%2Fpeople%2Fsurname-0033%2Fedit" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/surname-0033/edit", "id"=>"541"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3301]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 541]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 541]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3302]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:32.117448' WHERE "people"."id" = 3302 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2670]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:32.118969' WHERE "groups"."id" = 2670  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0033/edit Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Started GET "/people/surname-0033/edit" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0033"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3301]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0033' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3302) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.9ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3302]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3302]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:32.179773"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.134@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.179773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2671]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2671]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2671]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0042-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0042' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0042' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2671"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:32.184517"], ["name", "Group-0042"], ["slug", "group-0042"], ["team_email_address", "example.user.133@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.184517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:32.611481"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:32.611481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3303]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3303) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.9ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.5ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/add_membership" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (9.2ms) Completed 200 OK in 20ms (Views: 17.8ms | ActiveRecord: 0.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:32 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3303]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:32.983740"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.135@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.983740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2673]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2673]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2673]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2673"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:32.989797"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.136@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:32.989797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0034' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:32.992700"], ["slug", "surname-0034"], ["surname", "Surname-0034"], ["updated_at", "2014-10-13 14:21:32.992700"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:32.994558"], ["group_id", 2674], ["person_id", 3304], ["updated_at", "2014-10-13 14:21:32.994558"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3304]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:32.995927' WHERE "people"."id" = 3304 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:32.996592' WHERE "groups"."id" = 2674  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:33.427194"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:33.427194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3305]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3305) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/surname-0034/edit" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3304) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2673, 2674) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (6.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2673, 2674) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3304]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (30.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.4ms) Completed 200 OK in 52ms (Views: 45.5ms | ActiveRecord: 1.8ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.3ms) Started PATCH "/people/surname-0034" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0034", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2674", "leader"=>"0", "id"=>"542"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3304) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3304]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 3304 AND "memberships"."id" != 542 AND "memberships"."group_id" = 2674) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2674 AND "memberships"."id" != 542 AND "memberships"."person_id" = 3304) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0034' AND "people"."given_name" = '' AND ("people"."id" != 3304) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 3304 AND "memberships"."id" != 542 AND "memberships"."group_id" = 2674) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2674 AND "memberships"."id" != 542 AND "memberships"."person_id" = 3304) LIMIT 1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 3304 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:33.721338"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 542 [["role", "Head Honcho"], ["updated_at", "2014-10-13 14:21:33.722959"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:33.723747' WHERE "people"."id" = 3304 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:33.724354' WHERE "groups"."id" = 2674  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/surname-0034 Completed 302 Found in 19ms (ActiveRecord: 3.3ms) Started GET "/people/surname-0034" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0034"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3305]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0034' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3304) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2673, 2674) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2673, 2674) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.3ms) Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 3304]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:33.822803"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.138@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:33.822803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2675]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2675]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2675"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:33.828092"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.137@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:33.828092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:33 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (4.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 22.2ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.8ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:34.291192"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:34.291192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3306]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3306) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 35.9ms | ActiveRecord: 0.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Taylor", "memberships_attributes"=>{"0"=>{"role"=>"Head Honcho", "group_id"=>"2676", "leader"=>"1"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'taylor' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Taylor' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:34.590259"], ["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "taylor"], ["surname", "Taylor"], ["updated_at", "2014-10-13 14:21:34.590259"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:34.591421"], ["group_id", 2676], ["leader", "t"], ["person_id", 3307], ["role", "Head Honcho"], ["updated_at", "2014-10-13 14:21:34.591421"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3307]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:34.593437' WHERE "people"."id" = 3307 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2676]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:34.595093' WHERE "groups"."id" = 2676  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/taylor Completed 302 Found in 14ms (ActiveRecord: 2.3ms) Started GET "/people/taylor" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"taylor"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3306]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'taylor' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.8ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3307) ORDER BY groups.name Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2675, 2676) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2675, 2676) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 1.9ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name DESC LIMIT 1 [["person_id", 3307]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:34.696435"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.139@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:34.696435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice-digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2677"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:34.702640"], ["name", "Digital Justice"], ["slug", "digital-justice-digital-justice"], ["team_email_address", "example.user.140@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:34.702640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0035' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:34.705481"], ["slug", "surname-0035"], ["surname", "Surname-0035"], ["updated_at", "2014-10-13 14:21:34.705481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:34.707490"], ["group_id", 2678], ["person_id", 3308], ["updated_at", "2014-10-13 14:21:34.707490"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3308]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:34.709059' WHERE "people"."id" = 3308 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:34.709835' WHERE "groups"."id" = 2678  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'digital-justice' AND "groups"."id" != 2677) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2677 [["team_email_address", "example.user.142@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:34.714953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2677]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Communications-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'communications' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'communications' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2677"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:34.722534"], ["name", "Communications"], ["slug", "communications"], ["team_email_address", "example.user.141@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:34.722534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:34 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:35.163747"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:35.163747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3309]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3309) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/surname-0035/edit" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3308) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2678) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2678) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3308]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 44ms (Views: 37.5ms | ActiveRecord: 1.7ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/people/add_membership?id=surname-0035" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::PeopleController#add_membership as */* Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3308) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Completed 200 OK in 12ms (Views: 5.8ms | ActiveRecord: 1.3ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:35 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/surname-0035" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0035", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"2678", "leader"=>"0", "id"=>"544"}, "70356777227760"=>{"role"=>"Talker", "group_id"=>"2679", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"surname-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3308) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3308]] Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 3308 AND "memberships"."id" != 544 AND "memberships"."group_id" = 2678) LIMIT 1 Peoplefinder::Membership Exists (0.2ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2678 AND "memberships"."id" != 544 AND "memberships"."person_id" = 3308) LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0035' AND "people"."given_name" = '' AND ("people"."id" != 3308) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."person_id" = 3308 AND "memberships"."id" != 544 AND "memberships"."group_id" = 2678) LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "memberships" WHERE ("memberships"."group_id" = 2678 AND "memberships"."id" != 544 AND "memberships"."person_id" = 3308) LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 3308 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:36.469063"]] SQL (0.2ms) UPDATE "memberships" SET "role" = $1, "updated_at" = $2 WHERE "memberships"."id" = 544 [["role", ""], ["updated_at", "2014-10-13 14:21:36.470184"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.470935' WHERE "people"."id" = 3308 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.471584' WHERE "groups"."id" = 2678 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.472271"], ["group_id", 2679], ["person_id", 3308], ["role", "Talker"], ["updated_at", "2014-10-13 14:21:36.472271"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3308]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.473779' WHERE "people"."id" = 3308 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2679]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.475058' WHERE "groups"."id" = 2679  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/surname-0035 Completed 302 Found in 23ms (ActiveRecord: 4.5ms) Started GET "/people/surname-0035" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0035"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3309]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0035' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3308) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2679) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2678) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2679) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2677, 2678) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 SQL (0.5ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3308]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.572605"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0036"], ["updated_at", "2014-10-13 14:21:36.572605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.577021"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:36.577021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"3311"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3310]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3311' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3311]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.586697"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0037"], ["updated_at", "2014-10-13 14:21:36.586697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.591441"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:36.591441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#update as HTML Parameters: {"person"=>{"crop_x"=>"10", "crop_y"=>"20", "crop_w"=>"200", "crop_h"=>"200"}, "person_id"=>"3313"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3312]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3313' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3313]] Redirected to http://test.host/people/doe?cache_bust=1413210096 Completed 302 Found in 3ms (ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.600726"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0038"], ["updated_at", "2014-10-13 14:21:36.600726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bloggs' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.603322"], ["image", nil], ["slug", "bloggs"], ["surname", "Bloggs"], ["updated_at", "2014-10-13 14:21:36.603322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"3315"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3314]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3315' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3315]] Redirected to http://test.host/people/bloggs/edit Completed 302 Found in 4ms (ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.613986"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0039"], ["updated_at", "2014-10-13 14:21:36.613986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'doe' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.616725"], ["image", nil], ["slug", "doe"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:36.616725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"doe"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3316]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'doe' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://test.host/people/doe/edit Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.625294"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0040"], ["updated_at", "2014-10-13 14:21:36.625294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0041' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.628713"], ["slug", "surname-0041"], ["surname", "Surname-0041"], ["updated_at", "2014-10-13 14:21:36.628713"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.635672"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.144@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.635672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2680]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2680]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2680]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0043-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0043' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2680"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:36.641236"], ["name", "Group-0043"], ["slug", "group-0043"], ["team_email_address", "example.user.143@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.641236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.642773"], ["group_id", 2681], ["person_id", 3319], ["updated_at", "2014-10-13 14:21:36.642773"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.643466' WHERE "people"."id" = 3319 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.644136' WHERE "groups"."id" = 2681  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"546"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3318]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 546]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 546]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3319]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.649119' WHERE "people"."id" = 3319 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2681]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.650466' WHERE "groups"."id" = 2681  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.655186"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0042"], ["updated_at", "2014-10-13 14:21:36.655186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0043' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.658011"], ["slug", "surname-0043"], ["surname", "Surname-0043"], ["updated_at", "2014-10-13 14:21:36.658011"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.664526"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.146@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.664526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2682]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2682]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2682]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0044-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0044' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2682"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:36.669179"], ["name", "Group-0044"], ["slug", "group-0044"], ["team_email_address", "example.user.145@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.669179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.670492"], ["group_id", 2683], ["person_id", 3321], ["updated_at", "2014-10-13 14:21:36.670492"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.671152' WHERE "people"."id" = 3321 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.671809' WHERE "groups"."id" = 2683  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people", "id"=>"547"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3320]] Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 547]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 547]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3321]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.677081' WHERE "people"."id" = 3321 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2683]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.678528' WHERE "groups"."id" = 2683  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 547]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0044' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.683354"], ["slug", "surname-0044"], ["surname", "Surname-0044"], ["updated_at", "2014-10-13 14:21:36.683354"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "updated_at" = $1, "works_sunday" = $2 WHERE "people"."id" = 3322 [["updated_at", "2014-10-13 14:21:36.684790"], ["works_sunday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0045' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at", "works_saturday") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.687996"], ["slug", "surname-0045"], ["surname", "Surname-0045"], ["updated_at", "2014-10-13 14:21:36.687996"], ["works_saturday", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0046' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.691679"], ["slug", "surname-0046"], ["surname", "Surname-0046"], ["updated_at", "2014-10-13 14:21:36.691679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:36.699104"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:36.699104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET image = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:36.710056"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:36.710056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET primary_phone_number = '', secondary_phone_number = null WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:36.719767"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:36.719767"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '')  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:36.732106"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:36.732106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "people" SET location = '' WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "image", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", "2014-10-13 14:21:36.742331"], ["description", "I am a real person"], ["email", "user.example@digital.justice.gov.uk"], ["given_name", "Bobby"], ["image", "placeholder.png"], ["location", "London"], ["primary_phone_number", "020 7946 0123"], ["secondary_phone_number", "07700 900123"], ["slug", "user-example"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:36.742331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "people" SET primary_phone_number = null, no_phone = true WHERE "people"."id" IN (SELECT "people"."id" FROM "people" ORDER BY "people"."surname" ASC, "people"."given_name" ASC) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE ( COALESCE(image,'') = '' OR COALESCE(location,'') = '' OR COALESCE( primary_phone_number, secondary_phone_number,'' ) = '') ORDER BY "people"."surname" ASC, "people"."given_name" ASC, "people"."email" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.760538"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.148@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.760538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.775648"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.150@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.775648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.781862"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0047"], ["updated_at", "2014-10-13 14:21:36.781862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.788135"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.151@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.788135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3330]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.797507"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0048"], ["updated_at", "2014-10-13 14:21:36.797507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.804163"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.152@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.804163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3331]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.812867"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0049"], ["updated_at", "2014-10-13 14:21:36.812867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3332]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.819103"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0050"], ["updated_at", "2014-10-13 14:21:36.819103"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3333]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:36.830183"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:36.830183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3334]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3334) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (37.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 47.1ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:36.894514"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.154@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.894514"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2688]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2688]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2688]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2688"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:36.899507"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.153@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:36.899507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:36.902199"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:21:36.902199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "leader", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:36.904254"], ["group_id", 2689], ["leader", "t"], ["person_id", 3335], ["role", "Jefe"], ["updated_at", "2014-10-13 14:21:36.904254"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3335]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.905716' WHERE "people"."id" = 3335 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.906421' WHERE "groups"."id" = 2689  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3335) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2688, 2689) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2688, 2689) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3335]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (6.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 36.7ms | ActiveRecord: 1.7ms) Started DELETE "/memberships/548?referer=%2Fpeople%2Fbob%2Fedit" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::MembershipsController#destroy as HTML Parameters: {"referer"=>"/people/bob/edit", "id"=>"548"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]] Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 548]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "memberships" WHERE "memberships"."id" = $1 [["id", 548]] SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:36.960781"], ["event", "destroy"], ["item_id", 548], ["item_type", "Peoplefinder::Membership"], ["object", "---\nid: 548\ngroup_id: 2689\nperson_id: 3335\nrole: Jefe\ncreated_at: 2014-10-13 14:21:36.904254000 Z\nupdated_at: 2014-10-13 14:21:36.904254000 Z\nleader: true\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 548], ["item_type", "Peoplefinder::Membership"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3335]] SQL (0.4ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:36.965007' WHERE "people"."id" = 3335 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2689]] SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:36.967074' WHERE "groups"."id" = 2689  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob/edit Completed 302 Found in 11ms (ActiveRecord: 2.5ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:21:36 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3335) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3334]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 548]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3335]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2689]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 16.6ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.044684"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:37.044684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3336]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3336) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:37.091132"], ["given_name", "Greg"], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:21:37.091132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/greg-dan/edit" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3337) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (28.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 43ms (Views: 37.4ms | ActiveRecord: 1.1ms) Started DELETE "/people/greg-dan" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"greg-dan"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'greg-dan' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3337) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3337]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.147616"], ["event", "destroy"], ["item_id", 3337], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3337\ngiven_name: Greg\nsurname: Dan\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:21:37.091132000 Z\nupdated_at: 2014-10-13 14:21:37.091132000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3337], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 10ms (ActiveRecord: 2.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3337]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.6ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/295" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"295"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 295]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3337]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3337) AND "people"."slug" = 'greg-dan' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "id", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.091132"], ["given_name", "Greg"], ["id", 3337], ["slug", "greg-dan"], ["surname", "Dan"], ["updated_at", "2014-10-13 14:21:37.195990"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.198146"], ["event", "create"], ["item_id", 3337], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Greg\nsurname:\n- \n- Dan\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 10ms (ActiveRecord: 1.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3336]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3337]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3337]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.221434"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:37.221434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3338]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3338) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.5ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0051' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:37.266262"], ["slug", "surname-0051"], ["surname", "Surname-0051"], ["updated_at", "2014-10-13 14:21:37.266262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0051/edit" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0051"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3339) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 0.9ms) Started PATCH "/people/surname-0051" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Surname-0051", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0", "image"=>#, @original_filename="placeholder.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"person[image]\"; filename=\"placeholder.png\"\r\nContent-Type: image/png\r\nContent-Length: 2818\r\n">}, "commit"=>"Update Person", "id"=>"surname-0051"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3339) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0051' AND "people"."given_name" = '' AND ("people"."id" != 3339) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3339]] SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "image" = $4, "location" = $5, "primary_phone_number" = $6, "secondary_phone_number" = $7, "updated_at" = $8 WHERE "people"."id" = 3339 [["description", ""], ["email", ""], ["given_name", ""], ["image", "placeholder.png"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:37.325672"]] SQL (0.6ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:37.335820"], ["event", "update"], ["item_id", 3339], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3339\ngiven_name: \nsurname: Surname-0051\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: &1 2014-10-13 14:21:37.266262000 Z\nupdated_at: 2014-10-13 14:21:37.266262000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3339\n given_name: ''\n surname: Surname-0051\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: 2014-10-13 14:21:37.325672000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0051\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\nimage:\n- !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3339\n given_name: ''\n surname: Surname-0051\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: &1 2014-10-13 14:21:37.266262000 Z\n updated_at: &2 2014-10-13 14:21:37.325672000 Z\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0051\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n- &3 !ruby/object:Peoplefinder::ImageUploader\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3339\n given_name: ''\n surname: Surname-0051\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0051\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\n versions:\n :medium: &4 !ruby/object:Peoplefinder::ImageUploader::Uploader70356852075240\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3339\n given_name: ''\n surname: Surname-0051\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0051\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413210097-67437-3216\n cache_id: 1413210097-67437-3216\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210097-67437-3216/medium_placeholder.png\"\n original_filename: placeholder.png\n content_type: \n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *4\n versions: {}\n :croppable: &5 !ruby/object:Peoplefinder::ImageUploader::Uploader70356852095480\n model: !ruby/object:Peoplefinder::Person\n attributes:\n id: 3339\n given_name: ''\n surname: Surname-0051\n email: ''\n primary_phone_number: ''\n secondary_phone_number: ''\n location: ''\n description: ''\n created_at: *1\n updated_at: *2\n works_monday: true\n works_tuesday: true\n works_wednesday: true\n works_thursday: true\n works_friday: true\n image: placeholder.png\n slug: surname-0051\n works_saturday: false\n works_sunday: false\n no_phone: false\n mounted_as: :image\n parent_version: *3\n parent_cache_id: 1413210097-67437-3216\n cache_id: 1413210097-67437-3216\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210097-67437-3216/croppable_placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *5\n versions: {}\n cache_id: 1413210097-67437-3216\n filename: placeholder.png\n original_filename: placeholder.png\n file: !ruby/object:CarrierWave::SanitizedFile\n file: \"/Users/tobyprivett/Code/peoplefinder/spec/dummy/public/uploads/tmp/1413210097-67437-3216/placeholder.png\"\n original_filename: placeholder.png\n content_type: image/png\n cache_storage: !ruby/object:CarrierWave::Storage::File\n uploader: *3\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/surname-0051/image/edit Completed 302 Found in 26ms (ActiveRecord: 2.8ms) Started GET "/people/surname-0051/image/edit" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PersonImageController#edit as HTML Parameters: {"person_id"=>"surname-0051"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0051' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.5ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3338]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3339]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:37.382085"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.156@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:37.382085"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:37.383977"], ["event", "create"], ["item_id", 2690], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Ministry of Justice\nteam_email_address:\n- \n- example.user.156@digital.justice.gov.uk\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2690]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2690]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2690]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2690"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:37.389001"], ["name", "Digital Justice"], ["slug", "digital-justice"], ["team_email_address", "example.user.155@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:37.389001"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:37.392008"], ["event", "create"], ["item_id", 2691], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Digital Justice\nteam_email_address:\n- \n- example.user.155@digital.justice.gov.uk\nancestry:\n- \n- '2690'\nancestry_depth:\n- 0\n- 1\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:37.395299"], ["slug", "bob"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:21:37.395299"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:37.397070"], ["event", "create"], ["item_id", 3340], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nsurname:\n- \n- Bob\n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.835644"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:37.835644"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:37.837996"], ["event", "create"], ["item_id", 3341], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nemail:\n- \n- test.user@digital.justice.gov.uk\ngiven_name:\n- \n- John\nsurname:\n- \n- Doe\n"], ["whodunnit", "Public user"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3341]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 10ms (ActiveRecord: 1.7ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3341) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 46.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms) Started GET "/people/bob/edit" for 127.0.0.1 at 2014-10-13 15:21:37 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3340) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.2ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms) Started PATCH "/people/bob" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Bob", "memberships_attributes"=>{"0"=>{"role"=>"Jefe", "group_id"=>"2691", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3340) ORDER BY groups.name Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Bob' AND "people"."given_name" = '' AND ("people"."id" != 3340) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "updated_at" = $7 WHERE "people"."id" = 3340 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:38.124699"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:38.128292"], ["event", "update"], ["item_id", 3340], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3340\ngiven_name: \nsurname: Bob\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:21:37.395299000 Z\nupdated_at: 2014-10-13 14:21:37.395299000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]] SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:38.129204"], ["group_id", 2691], ["person_id", 3340], ["role", "Jefe"], ["updated_at", "2014-10-13 14:21:38.129204"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.130821"], ["event", "create"], ["item_id", 549], ["item_type", "Peoplefinder::Membership"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nrole:\n- \n- Jefe\ngroup_id:\n- \n- 2691\nperson_id:\n- \n- 3340\n"], ["whodunnit", "John Doe"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3340]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:38.132337' WHERE "people"."id" = 3340 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2691]] SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:38.134282' WHERE "groups"."id" = 2691  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://127.0.0.1:65224/people/bob Completed 302 Found in 24ms (ActiveRecord: 3.3ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3340) ORDER BY groups.name Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2690, 2691) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2690, 2691) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 1.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."id" = $1 LIMIT 1 [["id", 549]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3340]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2691]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_membership.html.haml (1.6ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3340]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3341]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3340]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2691]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2690]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 16.3ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.313099"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:38.313099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3342]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3342) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 31.6ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Jon", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Jon' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:38.412870"], ["description", ""], ["email", ""], ["given_name", "Jon"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "jon-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:38.412870"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.415308"], ["event", "create"], ["item_id", 3343], ["item_type", "Peoplefinder::Person"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- Jon\nsurname:\n- \n- Smith\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/jon-smith Completed 302 Found in 11ms (ActiveRecord: 1.5ms) Started GET "/people/jon-smith" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"jon-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'jon-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3343) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]]  (0.3ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3343]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 9.2ms | ActiveRecord: 1.2ms)  (0.3ms) SELECT COUNT(*) FROM "people" Started POST "/audit_trail/undo/304" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"304"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 304]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3343]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3343]] SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3343]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.462545"], ["event", "destroy"], ["item_id", 3343], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3343\ngiven_name: Jon\nsurname: Smith\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:21:38.412870000 Z\nupdated_at: 2014-10-13 14:21:38.412870000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.3ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 3343], ["item_type", "Peoplefinder::Person"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 9ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3342]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3343]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.3ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3343]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.3ms | ActiveRecord: 0.8ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.487944"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:38.487944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3344]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3344) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.7ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:38.538383"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.158@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:38.538383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2692"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:38.543399"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.157@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:38.543399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2693) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2692, 2693) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2692) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2692/2693' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.8ms | ActiveRecord: 2.2ms) Started PATCH "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"something else", "description"=>"", "responsibilities"=>"", "parent_id"=>"2692", "team_email_address"=>"example.user.157@digital.justice.gov.uk"}, "commit"=>"Update Group", "id"=>"original-name"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2693) ORDER BY people.surname  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2692]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'something else-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2693) AND "groups"."slug" = 'something-else' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'something-else' AND "groups"."id" != 2693) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "description" = $1, "name" = $2, "responsibilities" = $3, "slug" = $4, "updated_at" = $5 WHERE "groups"."id" = 2693 [["description", ""], ["name", "something else"], ["responsibilities", ""], ["slug", "something-else"], ["updated_at", "2014-10-13 14:21:38.588081"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:38.591730"], ["event", "update"], ["item_id", 2693], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2693\nname: original name\ncreated_at: 2014-10-13 14:21:38.543399000 Z\nupdated_at: 2014-10-13 14:21:38.543399000 Z\nslug: original-name\ndescription: \nresponsibilities: \nancestry: '2692'\nancestry_depth: 1\nteam_email_address: example.user.157@digital.justice.gov.uk\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- original name\n- something else\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/something-else Completed 302 Found in 16ms (ActiveRecord: 3.1ms) Started GET "/teams/something-else" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"something-else"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'something-else' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2693) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2692, 2693) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.8ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2693]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2692/2693' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2692/2693' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2693]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 2.8ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3344]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2693]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.642467"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:38.642467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3345]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3345) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.5ms | ActiveRecord: 1.2ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.5ms | ActiveRecord: 0.2ms) Started POST "/teams" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"utf8"=>"✓", "group"=>{"name"=>"Jon", "description"=>"", "responsibilities"=>"", "parent_id"=>"", "team_email_address"=>"something@example.com"}, "commit"=>"Create Group"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'jon' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'jon' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "description", "name", "responsibilities", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:38.714180"], ["description", ""], ["name", "Jon"], ["responsibilities", ""], ["slug", "jon"], ["team_email_address", "something@example.com"], ["updated_at", "2014-10-13 14:21:38.714180"]] SQL (0.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.716353"], ["event", "create"], ["item_id", 2694], ["item_type", "Peoplefinder::Group"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nname:\n- \n- Jon\ndescription:\n- \n- ''\nresponsibilities:\n- \n- ''\nteam_email_address:\n- \n- something@example.com\n"], ["whodunnit", "John Doe"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/jon Completed 302 Found in 9ms (ActiveRecord: 1.4ms) Started GET "/teams/jon" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"jon"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]] Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'jon' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2694) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2694) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.2ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2694]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2694' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2694' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2694]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 2.3ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3345]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2694]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.9ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.765517"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:38.765517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3346]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3346) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (34.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 44.3ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:38.828372"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.160@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:38.828372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'original name-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'original-name' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'original-name' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2695"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:38.833769"], ["name", "original name"], ["slug", "original-name"], ["team_email_address", "example.user.159@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:38.833769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/original-name/edit" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2696) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2695, 2696) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2695) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2695/2696' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.5ms | ActiveRecord: 2.2ms) Started DELETE "/teams/original-name" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"original-name"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'original-name' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2696) ORDER BY people.surname Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2695]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2695/2696/%' OR "groups"."ancestry" = '2695/2696')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2695/2696' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2696]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.872790"], ["event", "destroy"], ["item_id", 2696], ["item_type", "Peoplefinder::Group"], ["object", "---\nid: 2696\nname: original name\ncreated_at: 2014-10-13 14:21:38.833769000 Z\nupdated_at: 2014-10-13 14:21:38.833769000 Z\nslug: \ndescription: \nresponsibilities: \nancestry: '2695'\nancestry_depth: 1\nteam_email_address: example.user.159@digital.justice.gov.uk\n"], ["whodunnit", "John Doe"]] PaperTrail::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" ASC, "versions"."id" ASC [["item_id", 2696], ["item_type", "Peoplefinder::Group"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/teams/ministry-of-justice Completed 302 Found in 12ms (ActiveRecord: 2.4ms) Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2695) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2695) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.1ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2695]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2695' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2695' ORDER BY "groups"."name" ASC SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2695]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.9ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3346]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 ORDER BY "groups"."name" ASC LIMIT 1 [["id", 2696]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 7.9ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:38.916594"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:38.916594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3347]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3347) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:38.964141"], ["slug", "original-surname"], ["surname", "original surname"], ["updated_at", "2014-10-13 14:21:38.964141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/original-surname/edit" for 127.0.0.1 at 2014-10-13 15:21:38 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3348) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.1ms | ActiveRecord: 1.1ms) Started PATCH "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"something else", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3348) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'something else' AND "people"."given_name" = '' AND ("people"."id" != 3348) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3348 [["description", ""], ["email", ""], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "something else"], ["updated_at", "2014-10-13 14:21:39.024068"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:39.027516"], ["event", "update"], ["item_id", 3348], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3348\ngiven_name: \nsurname: original surname\nemail: \nprimary_phone_number: \nsecondary_phone_number: \nlocation: \ndescription: \ncreated_at: 2014-10-13 14:21:38.964141000 Z\nupdated_at: 2014-10-13 14:21:38.964141000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- \n- ''\nsurname:\n- original surname\n- something else\nlocation:\n- \n- ''\nprimary_phone_number:\n- \n- ''\nsecondary_phone_number:\n- \n- ''\nemail:\n- \n- ''\ndescription:\n- \n- ''\n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/original-surname Completed 302 Found in 14ms (ActiveRecord: 2.1ms) Started GET "/people/original-surname" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"original-surname"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'original-surname' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3348) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 1.2ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.3ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3348]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 11ms (Views: 8.4ms | ActiveRecord: 1.0ms) Started POST "/audit_trail/undo/309" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::VersionsController#undo as HTML Parameters: {"id"=>"309"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]] Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" WHERE "versions"."id" = $1 LIMIT 1 [["id", 309]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3348]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" != 3348) AND "people"."slug" = 'original-surname' LIMIT 1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "email" = $2, "given_name" = $3, "location" = $4, "primary_phone_number" = $5, "secondary_phone_number" = $6, "surname" = $7, "updated_at" = $8 WHERE "people"."id" = 3348 [["description", nil], ["email", nil], ["given_name", nil], ["location", nil], ["primary_phone_number", nil], ["secondary_phone_number", nil], ["surname", "original surname"], ["updated_at", "2014-10-13 14:21:39.077043"]] SQL (0.2ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:39.080192"], ["event", "update"], ["item_id", 3348], ["item_type", "Peoplefinder::Person"], ["object", "---\nid: 3348\ngiven_name: ''\nsurname: something else\nemail: ''\nprimary_phone_number: ''\nsecondary_phone_number: ''\nlocation: ''\ndescription: ''\ncreated_at: 2014-10-13 14:21:38.964141000 Z\nupdated_at: 2014-10-13 14:21:39.024068000 Z\nworks_monday: true\nworks_tuesday: true\nworks_wednesday: true\nworks_thursday: true\nworks_friday: true\nimage: \nslug: \nworks_saturday: false\nworks_sunday: false\nno_phone: false\n"], ["object_changes", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ngiven_name:\n- ''\n- \nsurname:\n- something else\n- original surname\nemail:\n- ''\n- \nprimary_phone_number:\n- ''\n- \nsecondary_phone_number:\n- ''\n- \nlocation:\n- ''\n- \ndescription:\n- ''\n- \n"], ["whodunnit", "John Doe"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/audit_trail Completed 302 Found in 11ms (ActiveRecord: 1.6ms) Started GET "/audit_trail" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::VersionsController#index as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3347]]  (0.2ms) SELECT COUNT(*) FROM "versions" Peoplefinder::Version Load (0.2ms) SELECT "versions".* FROM "versions" ORDER BY "versions"."created_at" DESC LIMIT 200 OFFSET 0 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3348]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (1.0ms) CACHE (0.0ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3348]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/versions/_general.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.7ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3348]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:39.106923"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:39.106923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3349]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3349]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3349]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3349) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.6ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:39.161385"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.161@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.161385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2697]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2697]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2697]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2697"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:39.167425"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.162@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.167425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2698]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2698]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2698]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2697/2698"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:39.172446"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.163@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.172446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2699]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2699]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2699]]  (0.5ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2697/2698/2699"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:39.179339"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.164@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.179339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:39.182778"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:21:39.182778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:39.184560"], ["group_id", 2698], ["person_id", 3350], ["updated_at", "2014-10-13 14:21:39.184560"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:39.185280' WHERE "people"."id" = 3350 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:39.185988' WHERE "groups"."id" = 2698  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:39.188434"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:21:39.188434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:39.190572"], ["group_id", 2698], ["person_id", 3351], ["updated_at", "2014-10-13 14:21:39.190572"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:39.191395' WHERE "people"."id" = 3351 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:39.192075' WHERE "groups"."id" = 2698  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:39.195156"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:21:39.195156"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:39.196930"], ["group_id", 2698], ["person_id", 3352], ["updated_at", "2014-10-13 14:21:39.196930"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:39.197632' WHERE "people"."id" = 3352 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:39.198258' WHERE "groups"."id" = 2698  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3349]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2698) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2697, 2698) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.1ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2698]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (2.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2697/2698' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2697/2698' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (2.1ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2697/2698' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 2.0ms) Started GET "/teams/a-team/people" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3349]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2698) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2697, 2698) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2698 OR "groups"."ancestry" ILIKE '2697/2698/%') OR "groups"."ancestry" = '2697/2698')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.6ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2700,2699,2698) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:39.265766"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.165@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.265766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2701]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2701]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2701]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2701"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:39.271066"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.166@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.271066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2702]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2702]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2702]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2701/2702"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:39.276336"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.167@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.276336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2703]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2703]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2703]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2701/2702/2703"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:39.281713"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.168@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:39.281713"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:39.716373"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:39.716373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3353]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3353]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3353]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3353) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.3ms | ActiveRecord: 1.0ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3353]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3353]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3353]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:39.964128"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:39.964128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3354]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3354]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:39 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3354]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3354) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (36.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 52ms (Views: 45.6ms | ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.028228"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.169@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.028228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2705]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2705]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2705]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2705"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.033555"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.170@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.033555"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2706]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2706]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2706]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2705/2706"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.039522"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.171@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.039522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2707]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2707]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2705/2706/2707"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.045512"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.172@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.045512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.048741"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:21:40.048741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.050339"], ["group_id", 2706], ["person_id", 3355], ["updated_at", "2014-10-13 14:21:40.050339"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.051014' WHERE "people"."id" = 3355 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.051632' WHERE "groups"."id" = 2706  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.053916"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:21:40.053916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.055398"], ["group_id", 2706], ["person_id", 3356], ["updated_at", "2014-10-13 14:21:40.055398"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.056010' WHERE "people"."id" = 3356 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.056576' WHERE "groups"."id" = 2706  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.059001"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:21:40.059001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.061035"], ["group_id", 2706], ["person_id", 3357], ["updated_at", "2014-10-13 14:21:40.061035"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.061980' WHERE "people"."id" = 3357 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.062649' WHERE "groups"."id" = 2706  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3354]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2706) ORDER BY people.surname Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2705, 2706) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.8ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2706]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2705/2706' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2705/2706' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2705/2706' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:40.094507"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:40.094507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3358]] Peoplefinder::Group Load (0.7ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3358]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3358]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3358) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.9ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.4ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.146306"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.173@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.146306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2709"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.152411"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.174@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.152411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2710]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2710]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2710]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2709/2710"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.157874"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.175@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.157874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2711]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2711]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2711]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2709/2710/2711"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.162802"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.176@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.162802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2709) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2709 [["team_email_address", "example.user.178@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.166122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'moj-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'moj' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'moj' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2709"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.171565"], ["name", "moj"], ["slug", "moj"], ["team_email_address", "example.user.177@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.171565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/groups/moj" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/teams/moj" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3358]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2713) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2709, 2713) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.3ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2713]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.8ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2709/2713' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2709/2713' ORDER BY "groups"."name" ASC SQL (0.6ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2713]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 2.5ms) Started GET "/groups/moj/edit" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/teams/moj/edit" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3358]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2713) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2709, 2713) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2709]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2709) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (9.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2709/2713' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 18.0ms | ActiveRecord: 2.2ms) Started GET "/groups/moj/people" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/teams/moj/people" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#all_people as HTML Parameters: {"id"=>"moj"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3358]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'moj' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2713) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2709, 2713) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Peoplefinder::Group Load (0.3ms) SELECT "groups"."id" FROM "groups" WHERE ((("groups"."id" = 2713 OR "groups"."ancestry" ILIKE '2709/2713/%') OR "groups"."ancestry" = '2709/2713')) ORDER BY "groups"."name" ASC Peoplefinder::Person Load (0.5ms) select distinct array_agg(role) as role_list, p.* from memberships m, people p where m.person_id = p.id AND group_id in (2713) group by p.id; Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:40.247460"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:40.247460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3359]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3359]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3359]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3359) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.1ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.297961"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.179@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.297961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2714]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2714]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2714]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2714"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.303291"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.180@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.303291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2715]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2715]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2715]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2714/2715"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.309955"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.181@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.309955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2716]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2716]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2716]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2714/2715/2716"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.315055"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.182@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.315055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'johnny-cash' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.317647"], ["given_name", "Johnny"], ["slug", "johnny-cash"], ["surname", "Cash"], ["updated_at", "2014-10-13 14:21:40.317647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.319261"], ["group_id", 2717], ["person_id", 3360], ["updated_at", "2014-10-13 14:21:40.319261"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.319999' WHERE "people"."id" = 3360 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.320625' WHERE "groups"."id" = 2717  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'dolly-parton' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.323245"], ["given_name", "Dolly"], ["slug", "dolly-parton"], ["surname", "Parton"], ["updated_at", "2014-10-13 14:21:40.323245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.324730"], ["group_id", 2717], ["person_id", 3361], ["updated_at", "2014-10-13 14:21:40.324730"]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.325377' WHERE "people"."id" = 3361 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.325970' WHERE "groups"."id" = 2717  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'merle-haggard' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.328308"], ["given_name", "Merle"], ["slug", "merle-haggard"], ["surname", "Haggard"], ["updated_at", "2014-10-13 14:21:40.328308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:40.329759"], ["group_id", 2717], ["person_id", 3362], ["updated_at", "2014-10-13 14:21:40.329759"]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:40.330429' WHERE "people"."id" = 3362 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:40.330987' WHERE "groups"."id" = 2717  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3359]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2717) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2714, 2715, 2716, 2717) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2717]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2714/2715/2716/2717' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2714/2715/2716/2717' ORDER BY "groups"."name" ASC SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2717]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:40.370843"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:40.370843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3363]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3363]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3363]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3363) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.6ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.419835"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.183@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.419835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2718]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2718]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2718]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2718"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.425651"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.184@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.425651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2719]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2719]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2719]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2718/2719"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.431628"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.185@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.431628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2720]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2720]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2720]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2718/2719/2720"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.436868"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.186@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.436868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3363]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2721) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2718, 2719, 2720, 2721) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.6ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2721]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.5ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2718/2719/2720/2721' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2718/2719/2720/2721' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2721]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:40.469866"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:40.469866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3364]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3364]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3364]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3364) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.0ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.523523"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.187@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.523523"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2722]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2722]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2722]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2722"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.528814"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.188@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.528814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2723]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2723]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2722/2723"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.534168"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.189@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.534168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2724]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2724]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2724]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2722/2723/2724"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.539742"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.190@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.539742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/teams/ministry-of-justice" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"ministry-of-justice"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3364]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2722) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2722) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (1.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2722]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 15ms (Views: 10.0ms | ActiveRecord: 1.6ms) Started GET "/teams/a-team" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-team"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3364]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-team' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2723) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2722, 2723) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (2.5ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2723]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.9ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 1.8ms) Started GET "/teams/a-subteam" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-subteam"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3364]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-subteam' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2724) ORDER BY people.surname Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2722, 2723, 2724) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.0ms) Peoplefinder::Membership Load (0.2ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2724]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723/2724' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723/2724' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_subgroup.html.haml (0.8ms) CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2722/2723/2724' ORDER BY "groups"."name" ASC Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:40.611602"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.191@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.611602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2726]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2726]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2726]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Team-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-team' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-team' LIMIT 1 SQL (0.6ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2726"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:40.617424"], ["name", "A Team"], ["slug", "a-team"], ["team_email_address", "example.user.192@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.617424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2727]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2727]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2727]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Subteam-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-subteam' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-subteam' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2726/2727"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:40.623921"], ["name", "A Subteam"], ["slug", "a-subteam"], ["team_email_address", "example.user.193@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.623921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2728]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2728]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2728]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'A Leaf Node-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'a-leaf-node' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2726/2727/2728"], ["ancestry_depth", 3], ["created_at", "2014-10-13 14:21:40.639542"], ["name", "A Leaf Node"], ["slug", "a-leaf-node"], ["team_email_address", "example.user.194@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:40.639542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://127.0.0.1:65224/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:40 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms) Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:41.074448"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:41.074448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3365]] Redirected to http://127.0.0.1:65224/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3365) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.1ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.6ms) Started GET "/org.json" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) Started GET "/teams/a-leaf-node" for 127.0.0.1 at 2014-10-13 15:21:41 +0100 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"a-leaf-node"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3365]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'a-leaf-node' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2729) ORDER BY people.surname Peoplefinder::Group Load (0.5ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" IN (2726, 2727, 2728, 2729) ORDER BY (case when groups.ancestry is null then 0 else 1 end), groups.ancestry Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_breadcrumbs.html.haml (3.9ms) Peoplefinder::Membership Load (0.1ms) SELECT "memberships".* FROM "memberships" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 't' [["group_id", 2729]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_detail.html.haml (1.7ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2726/2727/2728/2729' ORDER BY "groups"."name" ASC CACHE (0.0ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2726/2727/2728/2729' ORDER BY "groups"."name" ASC SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" = $1 AND "memberships"."leader" = 'f' ORDER BY people.surname ASC, people.given_name ASC [["group_id", 2729]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/memberships/_summary.html.haml (0.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.378732"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:21:41.378732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.382054"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:21:41.382054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 3367], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 3366]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.5ms Sent mail to recipient@example.com (2.0ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdff55e7f8_1076d3ffd35465bf0874dc@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.391906"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:21:41.391906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.394361"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:21:41.394361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 3369], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 3368]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.6ms Sent mail to recipient@example.com (3.0ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdff561be3_1076d3ffd35465bf0875aa@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.405599"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:21:41.405599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.407975"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:21:41.407975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 3371], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 3370]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to recipient@example.com (2.2ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdff564b94_1076d3ffd35465bf087652@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.417149"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:21:41.417149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.419756"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:21:41.419756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 3373], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 3372]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.1ms Sent mail to recipient@example.com (1.8ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdff567859_1076d3ffd35465bf08776c@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'subject-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.428079"], ["slug", "subject-person"], ["surname", "subject-person"], ["updated_at", "2014-10-13 14:21:41.428079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'notifier-person' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.430530"], ["slug", "notifier-person"], ["surname", "notifier-person"], ["updated_at", "2014-10-13 14:21:41.430530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("additional_details", "notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["additional_details", "more info"], ["notifier_id", 3375], ["reason_for_reporting", "something"], ["recipient_email", "recipient@example.com"], ["subject_id", 3374]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.2ms Sent mail to recipient@example.com (1.9ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: recipient@example.com Message-ID: <543bdff56a2e0_1076d3ffd35465bf08789d@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit notifier-person has said that they believe the information on subject-person to be incorrect. Reason for reporting: something Additional details: more info Please fix or delete this page: http://www.example.com/people/subject-person  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.439532"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0052"], ["updated_at", "2014-10-13 14:21:41.439532"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.441554"], ["updated_at", "2014-10-13 14:21:41.441554"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "53e391a9-67f8-4d78-8a08-0486060c5864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3376]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 7.1ms Sent mail to test.user@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdff56d93e_1076d3ffd35465bf087945@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/53e391a9-67f8-4d78-8a08-0486060c5864?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.454227"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0053"], ["updated_at", "2014-10-13 14:21:41.454227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.456321"], ["updated_at", "2014-10-13 14:21:41.456321"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "66629a2b-5f6b-43d0-96f9-205fcbac8559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3377]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.3ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdff5707d1_1076d3ffd35465bf0880c2@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/66629a2b-5f6b-43d0-96f9-205fcbac8559?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.464878"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0054"], ["updated_at", "2014-10-13 14:21:41.464878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.466788"], ["updated_at", "2014-10-13 14:21:41.466788"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "d66d3255-6f31-4dac-b450-99cd3d3088d0"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3378]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.0ms Sent mail to test.user@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdff572f81_1076d3ffd35465bf088135@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/d66d3255-6f31-4dac-b450-99cd3d3088d0?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.475274"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0055"], ["updated_at", "2014-10-13 14:21:41.475274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.476941"], ["updated_at", "2014-10-13 14:21:41.476941"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "851c6c40-5ca0-4308-b772-4ef884d8c98d"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3379]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 3.6ms Sent mail to test.user@digital.justice.gov.uk (1.9ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdff5755d1_1076d3ffd35465bf08826d@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/851c6c40-5ca0-4308-b772-4ef884d8c98d?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.484861"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0056"], ["updated_at", "2014-10-13 14:21:41.484861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.486648"], ["updated_at", "2014-10-13 14:21:41.486648"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "fa89cc81-f4e1-41ce-9fd3-8b6f5ccadbc9"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3380]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.4ms Sent mail to test.user@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdff577f0f_1076d3ffd35465bf0883a0@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/fa89cc81-f4e1-41ce-9fd3-8b6f5ccadbc9?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete.  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0057' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.501276"], ["slug", "surname-0057"], ["surname", "Surname-0057"], ["updated_at", "2014-10-13 14:21:41.501276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0058' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.504682"], ["slug", "surname-0058"], ["surname", "Surname-0058"], ["updated_at", "2014-10-13 14:21:41.504682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobby-tables' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.508349"], ["given_name", "Bobby"], ["slug", "bobby-tables"], ["surname", "Tables"], ["updated_at", "2014-10-13 14:21:41.508349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3383]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'user-example' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.512060"], ["email", "user.example@digital.justice.gov.uk"], ["slug", "user-example"], ["surname", "Surname-0059"], ["updated_at", "2014-10-13 14:21:41.512060"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3384]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0060' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.515729"], ["slug", "surname-0060"], ["surname", "Surname-0060"], ["updated_at", "2014-10-13 14:21:41.515729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.522401"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.196@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.522401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2730"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.527120"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.195@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.527120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2730) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2730 [["team_email_address", "example.user.198@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.530294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2730]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Estates-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'estates' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'estates' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2730"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.534829"], ["name", "Estates"], ["slug", "estates"], ["team_email_address", "example.user.197@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.534829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.537000"], ["group_id", 2732], ["person_id", 3385], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:41.537000"]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3385]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.538900' WHERE "people"."id" = 3385 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.539673' WHERE "groups"."id" = 2732  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.541086"], ["group_id", 2731], ["person_id", 3385], ["role", "Designer"], ["updated_at", "2014-10-13 14:21:41.541086"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3385]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.542375' WHERE "people"."id" = 3385 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.542996' WHERE "groups"."id" = 2731  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3385]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0061' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.548636"], ["slug", "surname-0061"], ["surname", "Surname-0061"], ["updated_at", "2014-10-13 14:21:41.548636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3386]]  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0062' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.553219"], ["slug", "surname-0062"], ["surname", "Surname-0062"], ["updated_at", "2014-10-13 14:21:41.553219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.561003"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.199@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.561003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2733]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2733]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2733]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0047-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0047' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0047' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2733"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.565485"], ["name", "Group-0047"], ["slug", "group-0047"], ["team_email_address", "123@example.com"], ["updated_at", "2014-10-13 14:21:41.565485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.567542"], ["group_id", 2734], ["person_id", 3387], ["updated_at", "2014-10-13 14:21:41.567542"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3387]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.568957' WHERE "people"."id" = 3387 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.569733' WHERE "groups"."id" = 2734  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3387]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.578706"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.201@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.578706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2735) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2735 [["team_email_address", "example.user.203@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.581674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.595418"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.205@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.595418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2736) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2736 [["team_email_address", "example.user.207@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.598533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2736) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2736 [["team_email_address", "example.user.209@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.601427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2736) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2736 [["team_email_address", "example.user.211@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.604403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.614311"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.213@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.614311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2737) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2737 [["team_email_address", "example.user.215@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.617170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2737) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2737 [["team_email_address", "example.user.217@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.620421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (1.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2737) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2737 [["team_email_address", "example.user.219@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.625998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.636048"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.221@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.636048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2738) LIMIT 1 SQL (0.3ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2738 [["team_email_address", "example.user.223@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.639549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2738) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2738 [["team_email_address", "example.user.225@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.643498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2738) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2738 [["team_email_address", "example.user.227@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.646229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'ministry-of-justice' AND "groups"."id" != 2738) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "team_email_address" = $1, "updated_at" = $2 WHERE "groups"."id" = 2738 [["team_email_address", "example.user.229@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.651352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.684136"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0065"], ["updated_at", "2014-10-13 14:21:41.684136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.686580"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0066"], ["updated_at", "2014-10-13 14:21:41.686580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>""}, "person_id"=>"3389"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3388]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3389' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3389]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3389]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.701641"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0067"], ["updated_at", "2014-10-13 14:21:41.701641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.704175"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0068"], ["updated_at", "2014-10-13 14:21:41.704175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.712265"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.231@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.712265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2739]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2739]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2739]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0063-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0063' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0063' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2739"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.716709"], ["name", "Group-0063"], ["slug", "group-0063"], ["team_email_address", "example.user.230@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.716709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.718691"], ["group_id", 2740], ["person_id", 3391], ["updated_at", "2014-10-13 14:21:41.718691"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3391]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.720110' WHERE "people"."id" = 3391 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.720879' WHERE "groups"."id" = 2740  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"3391"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3390]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3391' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3391]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3391]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 3390], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.230@digital.justice.gov.uk"], ["subject_id", 3391]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to example.user.230@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: example.user.230@digital.justice.gov.uk Message-ID: <543bdff5b2680_1076d3ffd35465bf088461@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0067 has said that they believe the information on Surname-0068 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.736111"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0069"], ["updated_at", "2014-10-13 14:21:41.736111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.739273"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0070"], ["updated_at", "2014-10-13 14:21:41.739273"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.746925"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.233@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.746925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2741]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2741]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2741]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0064-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0064' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0064' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2741"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.751333"], ["name", "Group-0064"], ["slug", "group-0064"], ["team_email_address", "example.user.232@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.751333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.753330"], ["group_id", 2742], ["person_id", 3393], ["updated_at", "2014-10-13 14:21:41.753330"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3393]] SQL (0.2ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.754698' WHERE "people"."id" = 3393 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.755356' WHERE "groups"."id" = 2742  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"3393"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3392]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3393' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3393]] Unpermitted parameters: message Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3393]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 3392], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.232@digital.justice.gov.uk"], ["subject_id", 3393]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.232@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: example.user.232@digital.justice.gov.uk Message-ID: <543bdff5badd2_1076d3ffd35465bf0885e7@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0069 has said that they believe the information on Surname-0070 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.771152"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0071"], ["updated_at", "2014-10-13 14:21:41.771152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.774223"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0072"], ["updated_at", "2014-10-13 14:21:41.774223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.782420"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.235@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.782420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2743]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2743]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2743]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0065-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0065' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0065' LIMIT 1 SQL (0.1ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2743"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.787146"], ["name", "Group-0065"], ["slug", "group-0065"], ["team_email_address", "example.user.234@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.787146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.789310"], ["group_id", 2744], ["person_id", 3395], ["updated_at", "2014-10-13 14:21:41.789310"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3395]] SQL (0.5ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.790817' WHERE "people"."id" = 3395 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.791724' WHERE "groups"."id" = 2744  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"3395"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3394]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3395' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3395]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3395]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 3394], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.234@digital.justice.gov.uk"], ["subject_id", 3395]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to example.user.234@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: example.user.234@digital.justice.gov.uk Message-ID: <543bdff5c3ac0_1076d3ffd35465bf0886d5@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0071 has said that they believe the information on Surname-0072 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3395]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.808275"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0073"], ["updated_at", "2014-10-13 14:21:41.808275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.811046"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0074"], ["updated_at", "2014-10-13 14:21:41.811046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.818585"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.237@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.818585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2745]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2745]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2745]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0066-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0066' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0066' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2745"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.823379"], ["name", "Group-0066"], ["slug", "group-0066"], ["team_email_address", "example.user.236@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.823379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.825422"], ["group_id", 2746], ["person_id", 3397], ["updated_at", "2014-10-13 14:21:41.825422"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3397]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.826850' WHERE "people"."id" = 3397 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.827544' WHERE "groups"."id" = 2746  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"3397"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3396]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3397' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3397]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3397]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 3396], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.236@digital.justice.gov.uk"], ["subject_id", 3397]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.4ms Sent mail to example.user.236@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: example.user.236@digital.justice.gov.uk Message-ID: <543bdff5cc65f_1076d3ffd35465bf0887c0@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0073 has said that they believe the information on Surname-0074 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.moj.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.843708"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0075"], ["updated_at", "2014-10-13 14:21:41.843708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.846390"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0076"], ["updated_at", "2014-10-13 14:21:41.846390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.853701"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.239@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.853701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2747]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2747]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2747]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0067-%') Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0067' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0067' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2747"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:41.860147"], ["name", "Group-0067"], ["slug", "group-0067"], ["team_email_address", "example.user.238@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.860147"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:41.862833"], ["group_id", 2748], ["person_id", 3399], ["updated_at", "2014-10-13 14:21:41.862833"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3399]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:41.864610' WHERE "people"."id" = 3399 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:41.865460' WHERE "groups"."id" = 2748  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#create as HTML Parameters: {"reported_profile"=>{"reason_for_reporting"=>"Duplicate", "message"=>"Some stuff"}, "person_id"=>"3399"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3398]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3399' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3399]] Unpermitted parameters: message Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3399]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "reported_profiles" ("notifier_id", "reason_for_reporting", "recipient_email", "subject_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["notifier_id", 3398], ["reason_for_reporting", "Duplicate"], ["recipient_email", "example.user.238@digital.justice.gov.uk"], ["subject_id", 3399]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#reported_profile: processed outbound mail in 1.3ms Sent mail to example.user.238@digital.justice.gov.uk (2.2ms) Date: Mon, 13 Oct 2014 15:21:41 +0100 From: support@example.com To: example.user.238@digital.justice.gov.uk Message-ID: <543bdff5d5b7f_1076d3ffd35465bf08887c@Tobys-MacBook-Pro.local.mail> Subject: A People Finder profile has been reported Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Surname-0075 has said that they believe the information on Surname-0076 to be incorrect. Reason for reporting: Duplicate Please fix or delete this page: http://www.example.com/people/someone-else Redirected to http://test.host/people/someone-else Completed 302 Found in 9ms (ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.880984"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0077"], ["updated_at", "2014-10-13 14:21:41.880984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.883963"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0078"], ["updated_at", "2014-10-13 14:21:41.883963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"3401"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3400]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3401' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3401]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.892268"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0079"], ["updated_at", "2014-10-13 14:21:41.892268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.894868"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0080"], ["updated_at", "2014-10-13 14:21:41.894868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"3403"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3402]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3403' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3403]] Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.902928"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0081"], ["updated_at", "2014-10-13 14:21:41.902928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.905721"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0082"], ["updated_at", "2014-10-13 14:21:41.905721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::ReportedProfilesController#new as HTML Parameters: {"person_id"=>"3405"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3404]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3405' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3405]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:41.917179"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.240@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:41.917179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'jon-browne' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:41.920193"], ["email", "jon.browne@digital.justice.gov.uk"], ["given_name", "Jon"], ["primary_phone_number", "0711111111"], ["slug", "jon-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:21:41.920193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.3ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3406]] Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:42 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:42 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:42.945057"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:42.945057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3407]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3407]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:42 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3407]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3407) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (40.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 55ms (Views: 50.0ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:43 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3407]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.6ms) Started GET "/search?utf8=%E2%9C%93&query=Browne&commit=Search" for 127.0.0.1 at 2014-10-13 15:21:43 +0100 Processing by Peoplefinder::SearchController#index as HTML Parameters: {"utf8"=>"✓", "query"=>"Browne", "commit"=>"Search"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3407]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.6ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3406) ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 100 Peoplefinder::Membership Exists (0.3ms) SELECT 1 AS one FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 LIMIT 1 [["person_id", 3406]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_person.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.2ms | ActiveRecord: 0.8ms) SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:43.095593"], ["updated_at", "2014-10-13 14:21:43.095593"], ["user_email", "example.user.241@digital.justice.gov.uk"], ["value", "ecc4186d-3f9b-46e2-9f44-50dde67259f1"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."id" = $1 LIMIT 1 [["id", 216]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:43.100274"], ["updated_at", "2014-10-13 14:21:43.100274"], ["user_email", "example.user.242@digital.justice.gov.uk"], ["value", "56c7c5ab-cd6f-4849-a56c-5d2511395cef"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'text-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.105384"], ["email", "text.user@digital.justice.gov.uk"], ["slug", "text-user"], ["surname", "Surname-0083"], ["updated_at", "2014-10-13 14:21:43.105384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:43.107007"], ["updated_at", "2014-10-13 14:21:43.107007"], ["user_email", "text.user@digital.justice.gov.uk"], ["value", "a8e2ce69-c08a-4d2b-a41e-552308694f19"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "primary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.112985"], ["primary_phone_number", "0777-999-999"], ["slug", "surname-0084"], ["surname", "Surname-0084"], ["updated_at", "2014-10-13 14:21:43.112985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'hello' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:43.117479"], ["email", "hello@example.com"], ["primary_phone_number", "0207 123 45678"], ["secondary_phone_number", "0777-999-999"], ["slug", "hello"], ["surname", "Surname-0085"], ["updated_at", "2014-10-13 14:21:43.117479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.121776"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0086"], ["updated_at", "2014-10-13 14:21:43.121776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.129450"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.245@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.129450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0068-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0068' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0068' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2750"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.133982"], ["name", "Group-0068"], ["slug", "group-0068"], ["team_email_address", "example.user.244@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.133982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0068"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3411]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0068' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2751) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2750]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2751) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2751) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.150168"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0087"], ["updated_at", "2014-10-13 14:21:43.150168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.158390"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.247@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.158390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0069-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0069' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0069' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2752"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.162964"], ["name", "Group-0069"], ["slug", "group-0069"], ["team_email_address", "example.user.246@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.162964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0069"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3412]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0069' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2753) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2752]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2753) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2753) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.179014"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0088"], ["updated_at", "2014-10-13 14:21:43.179014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.187866"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.249@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.187866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0070-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0070' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0070' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2754"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.194307"], ["name", "Group-0070"], ["slug", "group-0070"], ["team_email_address", "example.user.248@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.194307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>""}, "id"=>"group-0070"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3413]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0070' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2755) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2754]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like '-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2755) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = '' AND "groups"."id" != 2755) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.210794"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0089"], ["updated_at", "2014-10-13 14:21:43.210794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.218861"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.251@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.218861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2756]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2756]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2756]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0071-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0071' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0071' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2756"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.225201"], ["name", "Group-0071"], ["slug", "group-0071"], ["team_email_address", "example.user.250@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.225201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0071", "team_email_address"=>"example.user.250@digital.justice.gov.uk"}, "id"=>"group-0071"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3414]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0071' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2757) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0071' AND "groups"."id" != 2757) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0071 Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.237283"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0090"], ["updated_at", "2014-10-13 14:21:43.237283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.245970"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.253@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.245970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0072-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0072' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0072' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2758"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.250834"], ["name", "Group-0072"], ["slug", "group-0072"], ["team_email_address", "example.user.252@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.250834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0073", "team_email_address"=>"example.user.254@digital.justice.gov.uk"}, "id"=>"group-0072"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3415]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0072' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2759) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2758]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0073-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" != 2759) AND "groups"."slug" = 'group-0073' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0073' AND "groups"."id" != 2759) LIMIT 1 SQL (0.2ms) UPDATE "groups" SET "name" = $1, "slug" = $2, "team_email_address" = $3, "updated_at" = $4 WHERE "groups"."id" = 2759 [["name", "Group-0073"], ["slug", "group-0073"], ["team_email_address", "example.user.254@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.263600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0073 Completed 302 Found in 12ms (ActiveRecord: 2.4ms) Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2759]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.269432"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0091"], ["updated_at", "2014-10-13 14:21:43.269432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.277232"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.256@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.277232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2760]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2760]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2760]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0074-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0074' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0074' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2760"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.282007"], ["name", "Group-0074"], ["slug", "group-0074"], ["team_email_address", "example.user.255@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.282007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#update as HTML Parameters: {"group"=>{"name"=>"Group-0074", "team_email_address"=>"example.user.255@digital.justice.gov.uk"}, "id"=>"group-0074"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3416]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0074' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2761) ORDER BY people.surname  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."slug" = 'group-0074' AND "groups"."id" != 2761) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0074 Completed 302 Found in 11ms (ActiveRecord: 1.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.298980"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0092"], ["updated_at", "2014-10-13 14:21:43.298980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.306120"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.258@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.306120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2762]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2762]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2762]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0075-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0075' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0075' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2762"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.310736"], ["name", "Group-0075"], ["slug", "group-0075"], ["team_email_address", "example.user.257@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.310736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#show as HTML Parameters: {"id"=>"group-0075"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3417]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0075' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2763) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.322115"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0093"], ["updated_at", "2014-10-13 14:21:43.322115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.330149"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.260@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.330149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2764]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2764]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2764]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0076-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0076' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0076' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2764"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.334729"], ["name", "Group-0076"], ["slug", "group-0076"], ["team_email_address", "example.user.259@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.334729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#edit as HTML Parameters: {"id"=>"group-0076"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3418]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0076' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2765) ORDER BY people.surname Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.345462"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0094"], ["updated_at", "2014-10-13 14:21:43.345462"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0077' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0077' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.348629"], ["name", "Group-0077"], ["slug", "group-0077"], ["team_email_address", "example.user.261@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.348629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2766]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0078-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0078' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0078' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2766"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.353510"], ["name", "Group-0078"], ["slug", "group-0078"], ["team_email_address", "example.user.262@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.353510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0078"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3419]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0078' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2767) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2766]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2766]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2766/2767/%' OR "groups"."ancestry" = '2766/2767')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2766/2767' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2767]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0077 Completed 302 Found in 8ms (ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.367039"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0095"], ["updated_at", "2014-10-13 14:21:43.367039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.373797"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.264@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.373797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2768]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0079-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0079' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0079' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2768"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.378498"], ["name", "Group-0079"], ["slug", "group-0079"], ["team_email_address", "example.user.263@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.378498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#destroy as HTML Parameters: {"id"=>"group-0079"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3420]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."slug" = 'group-0079' ORDER BY "groups"."name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "people"."id" AS t1_r0, "people"."given_name" AS t1_r1, "people"."surname" AS t1_r2, "people"."email" AS t1_r3, "people"."primary_phone_number" AS t1_r4, "people"."secondary_phone_number" AS t1_r5, "people"."location" AS t1_r6, "people"."description" AS t1_r7, "people"."created_at" AS t1_r8, "people"."updated_at" AS t1_r9, "people"."works_monday" AS t1_r10, "people"."works_tuesday" AS t1_r11, "people"."works_wednesday" AS t1_r12, "people"."works_thursday" AS t1_r13, "people"."works_friday" AS t1_r14, "people"."image" AS t1_r15, "people"."slug" AS t1_r16, "people"."works_saturday" AS t1_r17, "people"."works_sunday" AS t1_r18, "people"."no_phone" AS t1_r19 FROM "memberships" LEFT OUTER JOIN "people" ON "people"."id" = "memberships"."person_id" WHERE "memberships"."group_id" IN (2769) ORDER BY people.surname Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2768]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2768]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE (("groups"."ancestry" ILIKE '2768/2769/%' OR "groups"."ancestry" = '2768/2769')) Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" = '2768/2769' ORDER BY "groups"."name" ASC SQL (0.2ms) DELETE FROM "groups" WHERE "groups"."id" = $1 [["id", 2769]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 8ms (ActiveRecord: 2.2ms)  (0.3ms) SELECT COUNT(*) FROM "groups"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.394511"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0096"], ["updated_at", "2014-10-13 14:21:43.394511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3421]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.403860"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0097"], ["updated_at", "2014-10-13 14:21:43.403860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3422]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.412939"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0098"], ["updated_at", "2014-10-13 14:21:43.412939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>""}} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3423]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = '' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = '' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.424229"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0099"], ["updated_at", "2014-10-13 14:21:43.424229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0080", "team_email_address"=>"example.user.265@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3424]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0080' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0080' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.430178"], ["name", "Group-0080"], ["slug", "group-0080"], ["team_email_address", "example.user.265@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.430178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0080 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.435672"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0100"], ["updated_at", "2014-10-13 14:21:43.435672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "groups" Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0081", "team_email_address"=>"example.user.266@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3425]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0081' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0081' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.442303"], ["name", "Group-0081"], ["slug", "group-0081"], ["team_email_address", "example.user.266@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.442303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0081 Completed 302 Found in 5ms (ActiveRecord: 0.9ms)  (0.2ms) SELECT COUNT(*) FROM "groups"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.449334"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0101"], ["updated_at", "2014-10-13 14:21:43.449334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#create as HTML Parameters: {"group"=>{"name"=>"Group-0082", "team_email_address"=>"example.user.267@digital.justice.gov.uk"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3426]]  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0082' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0082' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.457709"], ["name", "Group-0082"], ["slug", "group-0082"], ["team_email_address", "example.user.267@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.457709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/teams/group-0082 Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.465264"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0102"], ["updated_at", "2014-10-13 14:21:43.465264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.471224"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.268@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.471224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3427]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.477804"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0103"], ["updated_at", "2014-10-13 14:21:43.477804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3428]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.486314"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0104"], ["updated_at", "2014-10-13 14:21:43.486314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.492552"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.269@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.492552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2774]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2774]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0083-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0083' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0083' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2774"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.497639"], ["name", "Group-0083"], ["slug", "group-0083"], ["team_email_address", "example.user.270@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.497639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3429]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://test.host/teams/ministry-of-justice Completed 302 Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.505802"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0105"], ["updated_at", "2014-10-13 14:21:43.505802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3430]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.512680"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0106"], ["updated_at", "2014-10-13 14:21:43.512680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3431]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.520143"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:21:43.520143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:43.523262"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:21:43.523262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.529712"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.272@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.529712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2776]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2776]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2776]]  (0.4ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2776"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:43.535033"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.271@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:43.535033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:43.537252"], ["group_id", 2777], ["person_id", 3433], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:43.537252"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3433]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:43.538743' WHERE "people"."id" = 3433 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:43.539540' WHERE "groups"."id" = 2777  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3432]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3433]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:44.562709"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:21:44.562709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:44.565307"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:21:44.565307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:44.571459"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.274@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:44.571459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2778]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2778]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2778]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2778"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:44.576694"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.273@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:44.576694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:44.578640"], ["group_id", 2779], ["person_id", 3435], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:44.578640"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3435]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:44.580182' WHERE "people"."id" = 3435 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:44.580872' WHERE "groups"."id" = 2779  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3434]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3435]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3435, 3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3435, 3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3435, 3433) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:45.603516"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:21:45.603516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:45.606358"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:21:45.606358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:45.612771"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.276@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:45.612771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2780]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2780]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2780]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2780"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:45.617350"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.275@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:45.617350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:45.619680"], ["group_id", 2781], ["person_id", 3437], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:45.619680"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3437]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:45.621615' WHERE "people"."id" = 3437 SQL (0.3ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:45.622379' WHERE "groups"."id" = 2781  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3436]] SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3437]] Peoplefinder::Person Load (0.7ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3432, 3434, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3432, 3434, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3432, 3434, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:46.643789"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:21:46.643789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:46.646335"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:21:46.646335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:46.652863"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.278@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:46.652863"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2782]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2782]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2782]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2782"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:46.659737"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.277@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:46.659737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:46.662055"], ["group_id", 2783], ["person_id", 3439], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:46.662055"]] Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3439]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:46.663509' WHERE "people"."id" = 3439 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:46.664187' WHERE "groups"."id" = 2783  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3438]] SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3439]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3434, 3438, 3432, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3434, 3438, 3432, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3434, 3438, 3432, 3436) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'alice-andrews' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:47.686094"], ["given_name", "Alice"], ["slug", "alice-andrews"], ["surname", "Andrews"], ["updated_at", "2014-10-13 14:21:47.686094"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-browning' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "given_name", "location", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", "2014-10-13 14:21:47.688661"], ["description", "weekends only"], ["given_name", "Bob"], ["location", "Petty France 10th floor"], ["slug", "bob-browning"], ["surname", "Browning"], ["updated_at", "2014-10-13 14:21:47.688661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:47.694875"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.280@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:47.694875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2784]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2784]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2784]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2784"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:47.699493"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.279@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:47.699493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "role", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:47.701609"], ["group_id", 2785], ["person_id", 3441], ["role", "Cleaner"], ["updated_at", "2014-10-13 14:21:47.701609"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3441]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:47.703096' WHERE "people"."id" = 3441 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:47.703745' WHERE "groups"."id" = 2785  (0.1ms) RELEASE SAVEPOINT active_record_1 Scoped order and limit are ignored, it's forced to be batch order and batch size Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1000 SQL (0.1ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3440]] SQL (0.2ms) SELECT "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY groups.name [["person_id", 3441]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433, 3439, 3441, 3437, 3435) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433, 3439, 3441, 3437, 3435) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" IN (3433, 3439, 3441, 3437, 3435) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) ROLLBACK SQL (0.3ms) DELETE FROM "memberships" SQL (0.2ms) DELETE FROM "people" SQL (0.2ms) DELETE FROM "groups" SQL (0.2ms) DELETE FROM "versions"  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.773708"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0107"], ["updated_at", "2014-10-13 14:21:48.773708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.780297"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.281@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.780297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::OrgController#show as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3442]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.791073"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.283@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.791073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2787]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2787]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2787]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0084-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0084' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0084' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2787"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:48.795499"], ["name", "Group-0084"], ["slug", "group-0084"], ["team_email_address", "example.user.282@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.795499"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.798369"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0108"], ["updated_at", "2014-10-13 14:21:48.798369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:48.800298"], ["updated_at", "2014-10-13 14:21:48.800298"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "35447559-9b07-4ad5-a4cb-0bf997a6c7dc"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3443]] Peoplefinder::ReminderMailer#inadequate_profile: processed outbound mail in 4.2ms Sent mail to test.user@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:48 +0100 From: support@example.com To: test.user@digital.justice.gov.uk Message-ID: <543bdffcc4765_1076d3ffd35465bf088959@Tobys-MacBook-Pro.local.mail> Subject: Reminder: update your profile today Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Your current profile is 22% complete, why not update it today. http://www.example.com/tokens/35447559-9b07-4ad5-a4cb-0bf997a6c7dc?desired_path=%2Fpeople%2Ftest-user%2Fedit It will only take a few moments and it's the perfect way to make sure your colleagues and co-workers have the most accurate details about you. Reminder emails will automatically stop when your update is complete. Started GET "/tokens/35447559-9b07-4ad5-a4cb-0bf997a6c7dc?desired_path=%2Fpeople%2Ftest-user%2Fedit" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/test-user/edit", "id"=>"35447559-9b07-4ad5-a4cb-0bf997a6c7dc"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '35447559-9b07-4ad5-a4cb-0bf997a6c7dc' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/test-user/edit Completed 302 Found in 3ms (ActiveRecord: 0.8ms) Started GET "/people/test-user/edit" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3443]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3443) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.863001"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.285@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.863001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2789]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2789]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2789]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0085-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0085' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0085' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2789"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:48.868056"], ["name", "Group-0085"], ["slug", "group-0085"], ["team_email_address", "example.user.284@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.868056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (17.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 21.1ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james@abscond.org"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 10ms (Views: 8.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.917105"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.287@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.917105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2791]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2791]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2791]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0086-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0086' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0086' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2791"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:48.922637"], ["name", "Group-0086"], ["slug", "group-0086"], ["team_email_address", "example.user.286@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.922637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:48.924645"], ["updated_at", "2014-10-13 14:21:48.924645"], ["user_email", "example.user.288@digital.justice.gov.uk"], ["value", "8f9e54a7-8910-4bb8-ae5d-ede54ee6b494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/8f9e54a7-8910-4bb8-ae5d-ede54ee6b494" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"8f9e54a7-8910-4bb8-ae5d-ede54ee6b494"} Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '8f9e54a7-8910-4bb8-ae5d-ede54ee6b494' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'example.user.288@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'example-user-288' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:48.930266"], ["email", "example.user.288@digital.justice.gov.uk"], ["given_name", "example"], ["slug", "example-user-288"], ["surname", "user"], ["updated_at", "2014-10-13 14:21:48.930266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3444]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3444]] Redirected to http://www.example.com/people/example-user-288/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/example-user-288/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"example-user-288"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3444]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'example-user-288' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3444) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:48.986734"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.290@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.986734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2793]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2793]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2793]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0087-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0087' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0087' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2793"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:48.991900"], ["name", "Group-0087"], ["slug", "group-0087"], ["team_email_address", "example.user.289@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:48.991900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:48.993694"], ["updated_at", "2014-10-13 14:21:48.993694"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "52004616-ea6c-4c51-ad15-598963b82bf3"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/52004616-ea6c-4c51-ad15-598963b82bf3" for 127.0.0.1 at 2014-10-13 15:21:48 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"52004616-ea6c-4c51-ad15-598963b82bf3"} Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '52004616-ea6c-4c51-ad15-598963b82bf3' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'james.darling@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'james-darling' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:48.999210"], ["email", "james.darling@digital.justice.gov.uk"], ["given_name", "james"], ["slug", "james-darling"], ["surname", "darling"], ["updated_at", "2014-10-13 14:21:48.999210"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3445]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3445]] Redirected to http://www.example.com/people/james-darling/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/james-darling/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"james-darling"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3445]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'james-darling' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3445) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.4ms | ActiveRecord: 1.3ms) Started DELETE "/sessions" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#destroy as HTML Redirected to http://www.example.com/ Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.068624"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.292@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.068624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2795]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2795]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2795]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0088-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0088' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0088' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2795"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.073686"], ["name", "Group-0088"], ["slug", "group-0088"], ["team_email_address", "example.user.291@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.073686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.076285"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user"], ["surname", "Bob"], ["updated_at", "2014-10-13 14:21:49.076285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.077859"], ["updated_at", "2014-10-13 14:21:49.077859"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "5429ae19-6bea-4dda-8828-00b84b1835ab"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/5429ae19-6bea-4dda-8828-00b84b1835ab" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"id"=>"5429ae19-6bea-4dda-8828-00b84b1835ab"} Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '5429ae19-6bea-4dda-8828-00b84b1835ab' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3446]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3446]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 4ms (ActiveRecord: 0.9ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3446]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3446) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.133890"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.294@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.133890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2797]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2797]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2797]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0089-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0089' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0089' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2797"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.138970"], ["name", "Group-0089"], ["slug", "group-0089"], ["team_email_address", "example.user.293@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.138970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"Bob"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.171722"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.296@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.171722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2799]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2799]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2799]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0090-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0090' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0090' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2799"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.176666"], ["name", "Group-0090"], ["slug", "group-0090"], ["team_email_address", "example.user.295@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.176666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Redirected to http://www.example.com/sessions/new Filter chain halted as :ensure_user rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms) Started GET "/sessions/new" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#new as HTML Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/sessions/_login_page.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started POST "/tokens" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::TokensController#create as HTML Parameters: {"utf8"=>"✓", "token"=>{"user_email"=>"james.darling@digital.justice.gov.uk"}, "commit"=>"Log in"}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.192567"], ["updated_at", "2014-10-13 14:21:49.192567"], ["user_email", "james.darling@digital.justice.gov.uk"], ["value", "6fd4d4ca-8212-4b1e-9bd4-841fecb0e5c5"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::TokenMailer#new_token_email: processed outbound mail in 5.4ms Sent mail to james.darling@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:49 +0100 From: support@example.com To: james.darling@digital.justice.gov.uk Message-ID: <543bdffd31997_1076d3ffd35465bf0890ef@Tobys-MacBook-Pro.local.mail> Subject: Access request to MOJ People Finder Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Someone has requested to log into MOJ People Finder with this email address. To log in, visit http://www.example.com/tokens/6fd4d4ca-8212-4b1e-9bd4-841fecb0e5c5 If you did not request this, please ignore this email. Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 5.0ms | ActiveRecord: 0.5ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.216804"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0109"], ["updated_at", "2014-10-13 14:21:49.216804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.219691"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0110"], ["updated_at", "2014-10-13 14:21:49.219691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>""}, "person_id"=>"3448"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3447]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3448' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3448]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.229977"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0111"], ["updated_at", "2014-10-13 14:21:49.229977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.232517"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0112"], ["updated_at", "2014-10-13 14:21:49.232517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"3450"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3449]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3450' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3450]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 3450], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.239569"], ["updated_at", "2014-10-13 14:21:49.239569"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "bb72e32e-a115-41d5-a739-86c2a1394017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 3.6ms Sent mail to someone.else@digital.justice.gov.uk (2.0ms) Date: Mon, 13 Oct 2014 15:21:49 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdffd3b6e3_1076d3ffd35465bf089156@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/bb72e32e-a115-41d5-a739-86c2a1394017?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 10ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.248756"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0113"], ["updated_at", "2014-10-13 14:21:49.248756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.251163"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0114"], ["updated_at", "2014-10-13 14:21:49.251163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#create as HTML Parameters: {"information_request"=>{"message"=>"Some stuff"}, "person_id"=>"3452"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3451]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3452' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3452]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "information_requests" ("message", "recipient_id", "sender_email") VALUES ($1, $2, $3) RETURNING "id" [["message", "Some stuff"], ["recipient_id", 3452], ["sender_email", "test.user@digital.moj.gov.uk"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.258120"], ["updated_at", "2014-10-13 14:21:49.258120"], ["user_email", "someone.else@digital.justice.gov.uk"], ["value", "b8197f4b-2dde-404b-969e-dcf45d953770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::ReminderMailer#information_request: processed outbound mail in 3.0ms Sent mail to someone.else@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:49 +0100 From: support@example.com To: someone.else@digital.justice.gov.uk Message-ID: <543bdffd3fc8a_1076d3ffd35465bf0892c6@Tobys-MacBook-Pro.local.mail> Subject: Request to update your People Finder profile Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Some stuff Log in to the People Finder: http://www.example.com/tokens/b8197f4b-2dde-404b-969e-dcf45d953770?desired_path=%2Fpeople%2Fsomeone-else%2Fedit Redirected to http://test.host/people/someone-else Completed 302 Found in 10ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.266868"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0115"], ["updated_at", "2014-10-13 14:21:49.266868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.269563"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0116"], ["updated_at", "2014-10-13 14:21:49.269563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"3454"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3453]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3454' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3454]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.278393"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0117"], ["updated_at", "2014-10-13 14:21:49.278393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.280765"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0118"], ["updated_at", "2014-10-13 14:21:49.280765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"3456"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3455]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3456' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3456]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.288193"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0119"], ["updated_at", "2014-10-13 14:21:49.288193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'someone-else' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.290744"], ["email", "someone.else@digital.justice.gov.uk"], ["slug", "someone-else"], ["surname", "Surname-0120"], ["updated_at", "2014-10-13 14:21:49.290744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::InformationRequestsController#new as HTML Parameters: {"person_id"=>"3458"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3457]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = '3458' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3458]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.299181"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0121"], ["updated_at", "2014-10-13 14:21:49.299181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0122' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.302510"], ["slug", "surname-0122"], ["surname", "Surname-0122"], ["updated_at", "2014-10-13 14:21:49.302510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0122"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3459]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0122' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3460) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3460]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.313811"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0123"], ["updated_at", "2014-10-13 14:21:49.313811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0124' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.316924"], ["slug", "surname-0124"], ["surname", "Surname-0124"], ["updated_at", "2014-10-13 14:21:49.316924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0124"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3461]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0124' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3462) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3462]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.2ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.328394"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0125"], ["updated_at", "2014-10-13 14:21:49.328394"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0126' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.331646"], ["slug", "surname-0126"], ["surname", "Surname-0126"], ["updated_at", "2014-10-13 14:21:49.331646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0126"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3463]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0126' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3464) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3464]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.342725"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0127"], ["updated_at", "2014-10-13 14:21:49.342725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0128' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.346218"], ["slug", "surname-0128"], ["surname", "Surname-0128"], ["updated_at", "2014-10-13 14:21:49.346218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"surname-0128"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3465]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0128' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3466) ORDER BY groups.name Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.359521"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0129"], ["updated_at", "2014-10-13 14:21:49.359521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0130' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.362864"], ["slug", "surname-0130"], ["surname", "Surname-0130"], ["updated_at", "2014-10-13 14:21:49.362864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0130"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3467]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0130' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3468) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.0ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.376684"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.298@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.376684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2801]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2801]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2801]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0091-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0091' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0091' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2801"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.381666"], ["name", "Group-0091"], ["slug", "group-0091"], ["team_email_address", "example.user.297@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.381666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.386245"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0131"], ["updated_at", "2014-10-13 14:21:49.386245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0132' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.389395"], ["slug", "surname-0132"], ["surname", "Surname-0132"], ["updated_at", "2014-10-13 14:21:49.389395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0132"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3469]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0132' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3470) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.400074"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0133"], ["updated_at", "2014-10-13 14:21:49.400074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0134' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.403283"], ["slug", "surname-0134"], ["surname", "Surname-0134"], ["updated_at", "2014-10-13 14:21:49.403283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.411031"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.300@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.411031"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2803]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2803]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2803]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0092-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0092' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0092' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2803"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.415741"], ["name", "Group-0092"], ["slug", "group-0092"], ["team_email_address", "example.user.299@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.415741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "memberships" ("created_at", "group_id", "person_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.417386"], ["group_id", 2804], ["person_id", 3472], ["updated_at", "2014-10-13 14:21:49.417386"]] Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3472]] SQL (0.3ms) UPDATE "people" SET "updated_at" = '2014-10-13 14:21:49.418865' WHERE "people"."id" = 3472 SQL (0.2ms) UPDATE "groups" SET "updated_at" = '2014-10-13 14:21:49.419556' WHERE "groups"."id" = 2804  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0134"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3471]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0134' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3472) ORDER BY groups.name Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.430300"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0135"], ["updated_at", "2014-10-13 14:21:49.430300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0136' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.433945"], ["slug", "surname-0136"], ["surname", "Surname-0136"], ["updated_at", "2014-10-13 14:21:49.433945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0136"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3473]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0136' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3474) ORDER BY groups.name Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.446495"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0137"], ["updated_at", "2014-10-13 14:21:49.446495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0138' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.448991"], ["slug", "surname-0138"], ["surname", "Surname-0138"], ["updated_at", "2014-10-13 14:21:49.448991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0138"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3475]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0138' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3476) ORDER BY groups.name Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.461377"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.302@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.461377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2805]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2805]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2805]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0093-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0093' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0093' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2805"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.466091"], ["name", "Group-0093"], ["slug", "group-0093"], ["team_email_address", "example.user.301@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.466091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.470843"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0139"], ["updated_at", "2014-10-13 14:21:49.470843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0140' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.473349"], ["slug", "surname-0140"], ["surname", "Surname-0140"], ["updated_at", "2014-10-13 14:21:49.473349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Parameters: {"id"=>"surname-0140"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3477]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0140' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.1ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3478) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 1.6ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.485046"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0141"], ["updated_at", "2014-10-13 14:21:49.485046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3479]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.494234"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.304@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.494234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2807]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2807]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2807]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0094-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0094' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0094' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2807"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.499121"], ["name", "Group-0094"], ["slug", "group-0094"], ["team_email_address", "example.user.303@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.499121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.503974"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0142"], ["updated_at", "2014-10-13 14:21:49.503974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#add_membership as HTML Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3480]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.510916"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0143"], ["updated_at", "2014-10-13 14:21:49.510916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.513477"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:21:49.513477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3481]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.523613"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0144"], ["updated_at", "2014-10-13 14:21:49.523613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0145", "image"=>"#"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3483]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0145' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0145' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "image", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.530824"], ["image", nil], ["slug", "surname-0145"], ["surname", "Surname-0145"], ["updated_at", "2014-10-13 14:21:49.530824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0145/image/edit Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.537530"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0146"], ["updated_at", "2014-10-13 14:21:49.537530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0147"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3485]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0147' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0147' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.544397"], ["slug", "surname-0147"], ["surname", "Surname-0147"], ["updated_at", "2014-10-13 14:21:49.544397"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0147 Completed 302 Found in 6ms (ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.550616"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0148"], ["updated_at", "2014-10-13 14:21:49.550616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "people" Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0149"}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3487]] Peoplefinder::Person Exists (0.4ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0149' LIMIT 1 Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0149' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.571680"], ["slug", "surname-0149"], ["surname", "Surname-0149"], ["updated_at", "2014-10-13 14:21:49.571680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0149 Completed 302 Found in 21ms (ActiveRecord: 1.5ms)  (0.3ms) SELECT COUNT(*) FROM "people"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.579958"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0150"], ["updated_at", "2014-10-13 14:21:49.579958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>"Surname-0151"}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3489]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0151' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0151' AND "people"."given_name" IS NULL AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.586753"], ["slug", "surname-0151"], ["surname", "Surname-0151"], ["updated_at", "2014-10-13 14:21:49.586753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0151 Completed 302 Found in 6ms (ActiveRecord: 1.1ms) Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.594751"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0152"], ["updated_at", "2014-10-13 14:21:49.594751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3491]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.602955"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0153"], ["updated_at", "2014-10-13 14:21:49.602955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3492]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.610850"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0154"], ["updated_at", "2014-10-13 14:21:49.610850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3493]] Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.619509"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0155"], ["updated_at", "2014-10-13 14:21:49.619509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"person"=>{"surname"=>""}} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3494]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = '' LIMIT 1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.631224"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.306@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.631224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2809]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2809]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2809]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0095-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0095' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0095' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2809"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.636010"], ["name", "Group-0095"], ["slug", "group-0095"], ["team_email_address", "example.user.305@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.636010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (1.0ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.643308"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0156"], ["updated_at", "2014-10-13 14:21:49.643308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bo-diddley' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.646732"], ["given_name", "Bo"], ["slug", "bo-diddley"], ["surname", "Diddley"], ["updated_at", "2014-10-13 14:21:49.646732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bobbie-browne' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.649183"], ["given_name", "Bobbie"], ["slug", "bobbie-browne"], ["surname", "Browne"], ["updated_at", "2014-10-13 14:21:49.649183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"given_name"=>"Bo", "surname"=>"Diddley"}, "id"=>"bobbie-browne"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3495]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bobbie-browne' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3497) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Diddley' AND "people"."given_name" = 'Bo' AND ("people"."id" != 3497) ORDER BY "people"."surname" ASC, "people"."given_name" ASC Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 1.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.661730"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0157"], ["updated_at", "2014-10-13 14:21:49.661730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0158' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.664918"], ["slug", "surname-0158"], ["surname", "Surname-0158"], ["updated_at", "2014-10-13 14:21:49.664918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0159", "image"=>"#"}, "id"=>"surname-0158"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3498]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0158' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3499) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0159' AND "people"."given_name" IS NULL AND ("people"."id" != 3499) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Load (0.9ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3499]] SQL (0.3ms) UPDATE "people" SET "image" = $1, "surname" = $2, "updated_at" = $3 WHERE "people"."id" = 3499 [["image", nil], ["surname", "Surname-0159"], ["updated_at", "2014-10-13 14:21:49.673538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0158/image/edit Completed 302 Found in 12ms (ActiveRecord: 2.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.683430"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0160"], ["updated_at", "2014-10-13 14:21:49.683430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0161' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.687125"], ["slug", "surname-0161"], ["surname", "Surname-0161"], ["updated_at", "2014-10-13 14:21:49.687125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0162", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0161"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3500]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0161' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3501) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0162' AND "people"."given_name" IS NULL AND ("people"."id" != 3501) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 3501 [["surname", "Surname-0162"], ["updated_at", "2014-10-13 14:21:49.696423"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0161 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.701466"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0163"], ["updated_at", "2014-10-13 14:21:49.701466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0164' LIMIT 1 SQL (0.1ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.704395"], ["slug", "surname-0164"], ["surname", "Surname-0164"], ["updated_at", "2014-10-13 14:21:49.704395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0165", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0164"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3502]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0164' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3503) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0165' AND "people"."given_name" IS NULL AND ("people"."id" != 3503) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 3503 [["surname", "Surname-0165"], ["updated_at", "2014-10-13 14:21:49.713077"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0164 Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 3503]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.718722"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0166"], ["updated_at", "2014-10-13 14:21:49.718722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0167' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.722001"], ["slug", "surname-0167"], ["surname", "Surname-0167"], ["updated_at", "2014-10-13 14:21:49.722001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>"Surname-0168", "works_monday"=>true, "works_tuesday"=>false, "works_saturday"=>true, "works_sunday"=>false}, "id"=>"surname-0167"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3504]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0167' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3505) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Surname-0168' AND "people"."given_name" IS NULL AND ("people"."id" != 3505) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "surname" = $1, "updated_at" = $2, "works_saturday" = $3, "works_tuesday" = $4 WHERE "people"."id" = 3505 [["surname", "Surname-0168"], ["updated_at", "2014-10-13 14:21:49.731216"], ["works_saturday", "t"], ["works_tuesday", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/people/surname-0167 Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.737522"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0169"], ["updated_at", "2014-10-13 14:21:49.737522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0170' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.740867"], ["slug", "surname-0170"], ["surname", "Surname-0170"], ["updated_at", "2014-10-13 14:21:49.740867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0170"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3506]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0170' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3507) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.753219"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0171"], ["updated_at", "2014-10-13 14:21:49.753219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0172' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.756718"], ["slug", "surname-0172"], ["surname", "Surname-0172"], ["updated_at", "2014-10-13 14:21:49.756718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0172"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3508]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0172' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3509) ORDER BY groups.name Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.768730"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0173"], ["updated_at", "2014-10-13 14:21:49.768730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0174' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.772670"], ["slug", "surname-0174"], ["surname", "Surname-0174"], ["updated_at", "2014-10-13 14:21:49.772670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0174"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3510]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0174' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3511) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.9ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.784456"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0175"], ["updated_at", "2014-10-13 14:21:49.784456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0176' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:49.787993"], ["slug", "surname-0176"], ["surname", "Surname-0176"], ["updated_at", "2014-10-13 14:21:49.787993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"person"=>{"surname"=>""}, "id"=>"surname-0176"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3512]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0176' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3513) ORDER BY groups.name Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.9ms) Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.4ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.3ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.802750"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.308@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.802750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2811]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2811]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2811]]  (0.3ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0096-%') Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0096' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0096' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2811"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.809651"], ["name", "Group-0096"], ["slug", "group-0096"], ["team_email_address", "example.user.307@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.809651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.815246"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0177"], ["updated_at", "2014-10-13 14:21:49.815246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#index as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3514]] Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.821857"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0178"], ["updated_at", "2014-10-13 14:21:49.821857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3515]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.829557"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0179"], ["updated_at", "2014-10-13 14:21:49.829557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3516]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.837656"], ["email", "test.user@digital.moj.gov.uk"], ["slug", "test-user"], ["surname", "Surname-0180"], ["updated_at", "2014-10-13 14:21:49.837656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3517]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.846899"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.310@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.846899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2813]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2813]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2813]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Group-0097-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'group-0097' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'group-0097' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2813"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.851825"], ["name", "Group-0097"], ["slug", "group-0097"], ["team_email_address", "example.user.309@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.851825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."name" ASC  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.0ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.3ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.869674"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.312@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.869674"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2815]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2815]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2815]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Justice-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2815"], ["ancestry_depth", 1], ["created_at", "2014-10-13 14:21:49.874554"], ["name", "Justice"], ["slug", "justice"], ["team_email_address", "example.user.311@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.874554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2816]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2816]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 LIMIT 1 [["id", 2816]]  (0.2ms) SELECT COUNT(*) FROM "groups" WHERE (slug like 'Digital Services-%') Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'digital-services' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'digital-services' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("ancestry", "ancestry_depth", "created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["ancestry", "2815/2816"], ["ancestry_depth", 2], ["created_at", "2014-10-13 14:21:49.879518"], ["name", "Digital Services"], ["slug", "digital-services"], ["team_email_address", "example.user.313@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.879518"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (4.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (8.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry_depth" = 0 ORDER BY "groups"."name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE ("groups"."id" IS NOT NULL) AND "groups"."slug" = 'ministry-of-justice' LIMIT 1 Peoplefinder::Group Exists (0.2ms) SELECT 1 AS one FROM "groups" WHERE "groups"."slug" = 'ministry-of-justice' LIMIT 1 SQL (0.2ms) INSERT INTO "groups" ("created_at", "name", "slug", "team_email_address", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:49.898724"], ["name", "Ministry of Justice"], ["slug", "ministry-of-justice"], ["team_email_address", "example.user.314@digital.justice.gov.uk"], ["updated_at", "2014-10-13 14:21:49.898724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:49.906776"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:49.906776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3518]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3518]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3518]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3518) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3518]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:49.972353"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:49.972353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3519]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.6ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:49 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3519) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.8ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:50.018975"], ["email", "test.user"], ["slug", "test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd"], ["surname", "Surname-0181"], ["updated_at", "2014-10-13 14:21:50.018975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd/edit" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3520) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.0ms) Started DELETE "/people/test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-eb43fd59-9998-48d4-8043-c9dbbd8b44dd' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3520) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3520]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3519]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.096006"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.096006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3521]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3521) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.9ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.144706"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:50.144706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3522) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 12ms (Views: 8.1ms | ActiveRecord: 0.9ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3522) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smithe@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3522) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3522) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3522 [["description", ""], ["email", "bob.smithe@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:50.233889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:50.243389"], ["updated_at", "2014-10-13 14:21:50.243389"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "b45e46f8-7311-4996-86b7-16cf778e6b4e"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 10.0ms Sent mail to bob.smithe@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:50 +0100 From: support@example.com To: bob.smithe@digital.justice.gov.uk Message-ID: <543bdffe3d5bf_1076d3ffd35465bf089328@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/b45e46f8-7311-4996-86b7-16cf778e6b4e?desired_path=%2Fpeople%2Fbob-smith.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:50.253699"], ["updated_at", "2014-10-13 14:21:50.253699"], ["user_email", "bob.smithe@digital.justice.gov.uk"], ["value", "f984cacf-3b58-45f8-ab35-0e660af59078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 6.7ms Sent mail to bob.smith@digital.justice.gov.uk (2.6ms) Date: Mon, 13 Oct 2014 15:21:50 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdffe3fa87_1076d3ffd35465bf0894ec@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to bob.smithe@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/f984cacf-3b58-45f8-ab35-0e660af59078?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 39ms (ActiveRecord: 2.7ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3521]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3522) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 11.0ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.295942"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.295942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3523]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 8ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3523) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.3ms | ActiveRecord: 0.9ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.343780"], ["email", "test.user"], ["given_name", "Bob"], ["slug", "test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:50.343780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 0.9ms) Started GET "/people/test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb/edit" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.0ms | ActiveRecord: 1.3ms) Started PATCH "/people/test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3524) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3524) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3524 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:50.420621"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3523]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-bd8a00f5-40a5-4ed6-bfdc-3344a6d40dfb' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3524) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.447931"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.447931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3525]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3525]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3525]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.9ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3525) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 32.9ms | ActiveRecord: 1.4ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3525]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 30.1ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3525]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = '' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:50.547118"], ["description", ""], ["email", "test.user@something-else.example.com"], ["given_name", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-46c25dc0-3f47-4cbb-9cb5-2cbee09bd951"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:50.547118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-46c25dc0-3f47-4cbb-9cb5-2cbee09bd951 Completed 302 Found in 10ms (ActiveRecord: 1.4ms) Started GET "/people/test-user-46c25dc0-3f47-4cbb-9cb5-2cbee09bd951" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-46c25dc0-3f47-4cbb-9cb5-2cbee09bd951"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3525]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-46c25dc0-3f47-4cbb-9cb5-2cbee09bd951' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (1.0ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3526) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 18ms (Views: 10.7ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.578677"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.578677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3527]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3527]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3527) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3527]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 33.5ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3527]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:50.681794"], ["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:50.681794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:50.684229"], ["updated_at", "2014-10-13 14:21:50.684229"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "bed7a559-4080-47e3-b760-b6ce732edb58"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#new_profile_email: processed outbound mail in 6.0ms Sent mail to bob.smith@digital.justice.gov.uk (2.2ms) Date: Mon, 13 Oct 2014 15:21:50 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdffea8887_1076d3ffd35465bf089572@Tobys-MacBook-Pro.local.mail> Subject: A new profile on MOJ People Finder has been created for you Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder been created by test.user@digital.justice.gov.uk. They included this email address as the contact email address for this person. To see the profile, visit http://www.example.com/tokens/bed7a559-4080-47e3-b760-b6ce732edb58?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 17ms (ActiveRecord: 1.6ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3527]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3528) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 1.0ms) Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."surname" DESC, "people"."given_name" DESC LIMIT 1 Peoplefinder::Token Load (0.2ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.5ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.721943"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.721943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3529]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3529) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.771693"], ["email", "bob.smith"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:50.771693"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3530) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 10.0ms | ActiveRecord: 1.3ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3530) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (39.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 54ms (Views: 48.6ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3530) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3530) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3530 [["description", ""], ["email", "test.user"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:50.871146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 13ms (ActiveRecord: 2.0ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3529]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3530) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:50.898833"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:50.898833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3531]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3531) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 0.9ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:50.945361"], ["email", "test.user@something-else.example.com"], ["slug", "test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284"], ["surname", "Surname-0182"], ["updated_at", "2014-10-13 14:21:50.945361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284/edit" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3532) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.1ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-064ca0d3-fb3f-417d-b7b3-4175700e5284' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3532) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3532]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:50 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Peoplefinder::Group Load (0.4ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 3ms (ActiveRecord: 0.6ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3531]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.026188"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.026188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3533]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3533) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.073736"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:51.073736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3534) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53/edit" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3534) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.2ms) Started PATCH "/people/test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3534) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3534) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3534 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:51.153043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53 Completed 302 Found in 12ms (ActiveRecord: 1.9ms) Started GET "/people/test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3533]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-8a572f4c-b8ca-47f5-9ebf-3bde9f20be53' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3534) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.179319"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.179319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3535]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3535]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3535]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3535) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.1ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3535]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 30.7ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3535]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:51.278032"], ["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-792ebbd9-6e09-4510-9a59-3fc174bd49c2"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:51.278032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-792ebbd9-6e09-4510-9a59-3fc174bd49c2 Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-792ebbd9-6e09-4510-9a59-3fc174bd49c2" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-792ebbd9-6e09-4510-9a59-3fc174bd49c2"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3535]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-792ebbd9-6e09-4510-9a59-3fc174bd49c2' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3536) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 1.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.305854"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.305854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3537]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3537]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3537]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3537) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 33.2ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:51.351472"], ["email", "bob@digital.justice.gov.uk"], ["slug", "bob"], ["surname", "bob"], ["updated_at", "2014-10-13 14:21:51.351472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:51.354019"], ["updated_at", "2014-10-13 14:21:51.354019"], ["user_email", "bob@digital.justice.gov.uk"], ["value", "94b54e49-3c26-451f-8b28-f2d3c0ced8c7"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/tokens/94b54e49-3c26-451f-8b28-f2d3c0ced8c7?desired_path=%2Fpeople%2Fbob" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::TokensController#show as HTML Parameters: {"desired_path"=>"/people/bob", "id"=>"94b54e49-3c26-451f-8b28-f2d3c0ced8c7"} Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."value" = '94b54e49-3c26-451f-8b28-f2d3c0ced8c7' ORDER BY "tokens"."id" ASC LIMIT 1 Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'bob@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 Redirected to http://www.example.com/people/bob Completed 302 Found in 3ms (ActiveRecord: 0.7ms) Started GET "/people/bob" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3538]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3538) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.384540"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.384540"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3539]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3539) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.3ms) Completed 200 OK in 50ms (Views: 33.0ms | ActiveRecord: 1.2ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:51.443097"], ["email", "bob.smith@digital.justice.gov.uk"], ["slug", "bob-smith"], ["surname", "Surname-0183"], ["updated_at", "2014-10-13 14:21:51.443097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3540) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 38ms (Views: 32.5ms | ActiveRecord: 1.0ms) Started DELETE "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3540) ORDER BY groups.name Peoplefinder::UserUpdateMailer#deleted_profile_email: processed outbound mail in 3.9ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:51 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfff795a5_1076d3ffd35465bf08963@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been deleted Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder with this email address has been deleted by test.user@digital.justice.gov.uk.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3540]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 13ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3539]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (7.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 12.2ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.528235"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.528235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3541]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3541]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3541]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3541) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.2ms | ActiveRecord: 1.0ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3541]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 31.7ms | ActiveRecord: 0.2ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3541]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:51.629396"], ["description", ""], ["email", "test.user"], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "test-user-e94d6109-75b4-4699-91b5-45cce19a1951"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:51.629396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/test-user-e94d6109-75b4-4699-91b5-45cce19a1951 Completed 302 Found in 8ms (ActiveRecord: 1.2ms) Started GET "/people/test-user-e94d6109-75b4-4699-91b5-45cce19a1951" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-e94d6109-75b4-4699-91b5-45cce19a1951"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3541]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-e94d6109-75b4-4699-91b5-45cce19a1951' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3542) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.6ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.656057"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.656057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3543]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3543) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.7ms | ActiveRecord: 1.0ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'surname-0184' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:51.701314"], ["slug", "surname-0184"], ["surname", "Surname-0184"], ["updated_at", "2014-10-13 14:21:51.701314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/surname-0184/edit" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"surname-0184"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0184' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3544) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 35.1ms | ActiveRecord: 1.0ms) Started DELETE "/people/surname-0184" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"surname-0184"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'surname-0184' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3544) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3544]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3543]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.780939"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.780939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3545]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3545) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (22.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 33.0ms | ActiveRecord: 1.4ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.829492"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:51.829492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms) Started GET "/people/test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1/edit" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 1.0ms) Started PATCH "/people/test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3546) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3546) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3546 [["description", ""], ["email", "bob.smith@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:51.905223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:51.907618"], ["updated_at", "2014-10-13 14:21:51.907618"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "1460f2be-b9eb-4b3d-8a29-4b5783fdc6af"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_to_email: processed outbound mail in 2.9ms Sent mail to bob.smith@digital.justice.gov.uk (2.1ms) Date: Mon, 13 Oct 2014 15:21:51 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543bdfffde548_1076d3ffd35465bf0897f@Tobys-MacBook-Pro.local.mail> Subject: This email address has been added to a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, A profile on MOJ People Finder has had this email address added to it by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/1460f2be-b9eb-4b3d-8a29-4b5783fdc6af?desired_path=%2Fpeople%2Ftest-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1. Redirected to http://www.example.com/people/test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1 Completed 302 Found in 16ms (ActiveRecord: 2.1ms) Started GET "/people/test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3545]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-641aba90-d388-4866-bdc4-eb2b57d8e5c1' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3546) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 18ms (Views: 13.6ms | ActiveRecord: 1.0ms) Peoplefinder::Token Load (0.4ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:51.943543"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:51.943543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3547]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:51 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3547) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 60ms (Views: 39.4ms | ActiveRecord: 1.1ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.012559"], ["email", "bob.smith@something-else.example.com"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:52.012559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3548) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3548) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (21.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 30.7ms | ActiveRecord: 1.0ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@something-else.example.com", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3548) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3548) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3548 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:52.085786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 11ms (ActiveRecord: 1.8ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3547]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3548) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.112630"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:52.112630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3549]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3549) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 32.3ms | ActiveRecord: 1.0ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.3ms) INSERT INTO "people" ("created_at", "email", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:52.157853"], ["email", "test.user@digital.justice.gov.uk"], ["slug", "test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7"], ["surname", "Surname-0185"], ["updated_at", "2014-10-13 14:21:52.157853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7/edit" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3550) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 33.9ms | ActiveRecord: 1.1ms) Started DELETE "/people/test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#destroy as HTML Parameters: {"id"=>"test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user-c26e8739-a5e6-4bd8-a3d6-1f4d65c764b7' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3550) ORDER BY groups.name  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "people" WHERE "people"."id" = $1 [["id", 3550]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/ Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::HomeController#show as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Peoplefinder::Group Load (0.3ms) SELECT "groups".* FROM "groups" WHERE "groups"."ancestry" IS NULL ORDER BY "groups"."name" ASC LIMIT 1 Redirected to http://www.example.com/teams/new Completed 302 Found in 2ms (ActiveRecord: 0.5ms) Started GET "/teams/new" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::GroupsController#new as HTML Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3549]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/groups/_form.html.haml (6.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.238174"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:52.238174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3551]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3551]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3551) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 35.8ms | ActiveRecord: 1.1ms) Started GET "/people/new" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#new as HTML Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3551]] Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (5.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (32.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 39.1ms | ActiveRecord: 0.3ms) Started POST "/people" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#create as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Create Person"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3551]] Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" IS NOT NULL) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "people" ("created_at", "description", "email", "given_name", "location", "primary_phone_number", "secondary_phone_number", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["created_at", "2014-10-13 14:21:52.348485"], ["description", ""], ["email", ""], ["given_name", "Bob"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:52.348485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 9ms (ActiveRecord: 1.2ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3551]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3552) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 1.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.373658"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:52.373658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Group Load (0.1ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3553]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 6ms (ActiveRecord: 1.2ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3553) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 41ms (Views: 34.8ms | ActiveRecord: 1.3ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2014-10-13 14:21:52.423407"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:52.423407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.5ms | ActiveRecord: 1.1ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (2.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (4.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (27.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 45ms (Views: 38.8ms | ActiveRecord: 1.2ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3554) ORDER BY groups.name Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3554) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "surname" = $6, "updated_at" = $7 WHERE "people"."id" = 3554 [["description", ""], ["email", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:52.508430"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 12ms (ActiveRecord: 2.0ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3553]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3554) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 1.0ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.546965"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:52.546965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.1ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3555]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3555) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (26.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.5ms) Completed 200 OK in 43ms (Views: 37.1ms | ActiveRecord: 1.1ms)  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.597999"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:52.597999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3556) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3556) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (25.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 42ms (Views: 36.0ms | ActiveRecord: 1.1ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smith", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"test.user@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Person Load (0.6ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.7ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3556) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smith' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3556) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "people" SET "description" = $1, "email" = $2, "location" = $3, "primary_phone_number" = $4, "secondary_phone_number" = $5, "updated_at" = $6 WHERE "people"."id" = 3556 [["description", ""], ["email", "test.user@digital.justice.gov.uk"], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["updated_at", "2014-10-13 14:21:52.684821"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:52.687829"], ["updated_at", "2014-10-13 14:21:52.687829"], ["user_email", "test.user@digital.justice.gov.uk"], ["value", "3de57649-6bbc-4879-9a0b-94d364108a4d"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_address_from_email: processed outbound mail in 3.3ms Sent mail to bob.smith@digital.justice.gov.uk (2.4ms) Date: Mon, 13 Oct 2014 15:21:52 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543be000a8d2d_1076d3ffd35465bf0898d4@Tobys-MacBook-Pro.local.mail> Subject: This email address has been removed from a profile on MOJ People Finder Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. It previously had this email address, but this has now been changed to test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/3de57649-6bbc-4879-9a0b-94d364108a4d?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 23ms (ActiveRecord: 2.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3555]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.4ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3556) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.0ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.7ms | ActiveRecord: 0.9ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Started GET "/auth/gplus" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Started GET "/auth/gplus/callback" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::SessionsController#create as HTML Parameters: {"provider"=>"gplus"} Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."email" = 'test.user@digital.justice.gov.uk' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.2ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'test-user' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.718843"], ["email", "test.user@digital.justice.gov.uk"], ["given_name", "John"], ["slug", "test-user"], ["surname", "Doe"], ["updated_at", "2014-10-13 14:21:52.718843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Group Load (0.2ms) SELECT "groups".* FROM "groups" INNER JOIN "memberships" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" = $1 ORDER BY "groups"."name" ASC, groups.name [["person_id", 3557]] Redirected to http://www.example.com/people/test-user/edit?prompt=profile Completed 302 Found in 7ms (ActiveRecord: 1.3ms) Started GET "/people/test-user/edit?prompt=profile" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"prompt"=>"profile", "id"=>"test-user"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'test-user' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3557) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (24.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 34.0ms | ActiveRecord: 1.2ms)  (0.2ms) SAVEPOINT active_record_1 Peoplefinder::Person Exists (0.3ms) SELECT 1 AS one FROM "people" WHERE ("people"."id" IS NOT NULL) AND "people"."slug" = 'bob-smith' LIMIT 1 SQL (0.2ms) INSERT INTO "people" ("created_at", "email", "given_name", "slug", "surname", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2014-10-13 14:21:52.767851"], ["email", "bob.smith@digital.justice.gov.uk"], ["given_name", "Bob"], ["slug", "bob-smith"], ["surname", "Smith"], ["updated_at", "2014-10-13 14:21:52.767851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3558) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.6ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.0ms) Started GET "/people/bob-smith/edit" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#edit as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.6ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3558) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (2.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_editing_alert.html.haml (0.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_org_browser.html.erb (0.3ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_membership_fields.html.haml (3.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_form.html.haml (23.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.1ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 32.7ms | ActiveRecord: 1.3ms) Started PATCH "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#update as HTML Parameters: {"utf8"=>"✓", "person"=>{"given_name"=>"Bob", "surname"=>"Smelly Pants", "memberships_attributes"=>{"0"=>{"role"=>"", "group_id"=>"", "leader"=>"0"}}, "location"=>"", "primary_phone_number"=>"", "secondary_phone_number"=>"", "no_phone"=>"0", "email"=>"bob.smith@digital.justice.gov.uk", "description"=>"", "works_monday"=>"1", "works_tuesday"=>"1", "works_wednesday"=>"1", "works_thursday"=>"1", "works_friday"=>"1", "works_saturday"=>"0", "works_sunday"=>"0"}, "commit"=>"Update Person", "id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3558) ORDER BY groups.name Peoplefinder::Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."surname" = 'Smelly Pants' AND "people"."given_name" = 'Bob' AND ("people"."id" != 3558) ORDER BY "people"."surname" ASC, "people"."given_name" ASC  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "people" SET "description" = $1, "location" = $2, "primary_phone_number" = $3, "secondary_phone_number" = $4, "surname" = $5, "updated_at" = $6 WHERE "people"."id" = 3558 [["description", ""], ["location", ""], ["primary_phone_number", ""], ["secondary_phone_number", ""], ["surname", "Smelly Pants"], ["updated_at", "2014-10-13 14:21:52.845303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "tokens" ("created_at", "updated_at", "user_email", "value") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-10-13 14:21:52.847641"], ["updated_at", "2014-10-13 14:21:52.847641"], ["user_email", "bob.smith@digital.justice.gov.uk"], ["value", "ec07c7ab-da25-409c-a022-cdda5ab980e7"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Peoplefinder::UserUpdateMailer#updated_profile_email: processed outbound mail in 6.3ms Sent mail to bob.smith@digital.justice.gov.uk (3.6ms) Date: Mon, 13 Oct 2014 15:21:52 +0100 From: support@example.com To: bob.smith@digital.justice.gov.uk Message-ID: <543be000d0bc9_1076d3ffd35465bf0899b1@Tobys-MacBook-Pro.local.mail> Subject: Your profile on MOJ People Finder has been edited Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Your profile on MOJ People Finder been edited by test.user@digital.justice.gov.uk. To see the updated profile, visit http://www.example.com/tokens/ec07c7ab-da25-409c-a022-cdda5ab980e7?desired_path=%2Fpeople%2Fbob-smith. Redirected to http://www.example.com/people/bob-smith Completed 302 Found in 22ms (ActiveRecord: 1.9ms) Started GET "/people/bob-smith" for 127.0.0.1 at 2014-10-13 15:21:52 +0100 Processing by Peoplefinder::PeopleController#show as HTML Parameters: {"id"=>"bob-smith"} Peoplefinder::Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 [["id", 3557]] Peoplefinder::Person Load (0.4ms) SELECT "people".* FROM "people" WHERE "people"."slug" = 'bob-smith' ORDER BY "people"."surname" ASC, "people"."given_name" ASC LIMIT 1 SQL (0.5ms) SELECT "memberships".*, "memberships"."id" AS t0_r0, "memberships"."group_id" AS t0_r1, "memberships"."person_id" AS t0_r2, "memberships"."role" AS t0_r3, "memberships"."created_at" AS t0_r4, "memberships"."updated_at" AS t0_r5, "memberships"."leader" AS t0_r6, "groups"."id" AS t1_r0, "groups"."name" AS t1_r1, "groups"."created_at" AS t1_r2, "groups"."updated_at" AS t1_r3, "groups"."slug" AS t1_r4, "groups"."description" AS t1_r5, "groups"."responsibilities" AS t1_r6, "groups"."ancestry" AS t1_r7, "groups"."ancestry_depth" AS t1_r8, "groups"."team_email_address" AS t1_r9 FROM "memberships" LEFT OUTER JOIN "groups" ON "groups"."id" = "memberships"."group_id" WHERE "memberships"."person_id" IN (3558) ORDER BY groups.name Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumb.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_breadcrumbs.html.haml (0.8ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_breadcrumbs.html.haml (1.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_day.html.haml (0.7ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/people/_working_days.html.haml (0.9ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_loginout.html.haml (0.5ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_shared.html.haml (1.2ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/peoplefinder/shared/_search.html.haml (0.4ms) Rendered /Users/tobyprivett/Code/peoplefinder/app/views/layouts/peoplefinder/_ga.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 1.1ms) Peoplefinder::Token Load (0.3ms) SELECT "tokens".* FROM "tokens" ORDER BY "tokens"."id" DESC LIMIT 1  (0.1ms) ROLLBACK